Home › Forums › JavaScript › By pass the string parameter › Reply To: By pass the string parameter
November 28, 2013 at 11:34 am
#157310
Participant
I tried by passing AddFreq(‘2X’,4) inside the above xml but getting syntax error
My guess would be that you’re not escaping your quotes.
<a onclick='AddFreq( \'2X\',4 );' …
Beyond that, I’m not even sure what xml allows/doesn’t as far a javascript goes. I know that, generally speaking, javascript syntax is not compatible with xml and should be served separately from an external script file.