Jump to content

anyone know why i get missing ") after argument list" with this...


garry27

Recommended Posts

the following code works when i pass integer variables but not strings.

 

document.getElementById("pp-div2").innerHTML = "<a href='#' onClick='addPubFn(" + var1+ "," + var2+ "," + var3+ "); return false;'>Add to Pub Crawl</a>";	  
      changeBodyClass("pp-div2-hide","pp-div2-show"); 

 

i just get the same error. you can see this for yourself by clicking on a marker and then the add pub link in the panel here:

 

http://www.nl-webspace.co.uk/~unn_p921847/s2/create_crawl.php?call=2&postcode=dl3+7&lat=54.524800208734&lng=-1.5606556890128#

 

very odd

Sorry, my bad... the quoting is horrible.

 

"<a href='#' onClick='addPubFn(\"" + var1+ "\",\"" + var2+ "\",\"" + var3+ "\"); return false;'>Add to Pub Crawl</a>";	  
      changeBodyClass("pp-div2-hide","pp-div2-show"); 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.