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>