Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / July 2006



Tip: Looking for answers? Try searching our database.

passing string parameters containing -

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Iain Adams - 31 Jul 2006 15:53 GMT
Hey I am trying to pass some parameters into a javascript function.
This function is invoked from an onClick from a hyperlink. The
parameters are some id's for a database, most of these are just numebrs
but some are of the form xxxx-xxxx-xxxx when I pass these types nothing
happens and my debugger says theres a syntax error.

Heres and example of the code that creates the hyperlink:

<a href = '#' onClick='viewDetails(
bce97f96-3d0b-db11-9bd7-00065b9dbdb6,
f84696b0-421e-db11-b1fa-00065b9dbdb6)'>View Details</a>

I guess that javascript isnt liking the -'s. Is this true is there a
way to have them anyway
Paul - 31 Jul 2006 16:09 GMT
> Hey I am trying to pass some parameters into a javascript function.
> This function is invoked from an onClick from a hyperlink. The
[quoted text clipped - 10 lines]
> I guess that javascript isnt liking the -'s. Is this true is there a
> way to have them anyway
Try quoting the values:
<a href = '#' onClick='viewDetails(
"bce97f96-3d0b-db11-9bd7-00065b9dbdb6",
"f84696b0-421e-db11-b1fa-00065b9dbdb6")'>View Details</a>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.