Hi

pass string parameter in an onclick function

I would like to pass a parameter (i.e. a string) to an Onclick function. For the moment, I do this:

'<input type="button" onClick="gotoNode(' + result.name + ')" />'




Answer:
In apped div:
 '<input type="button" onClick="gotoNode(\'' + result.name + '\')" />'

creating Hyperlink:
href=\"javascript:BindGroupdetails(" + result[i].GroupID + "," + result[i].Permission + ",'" + result[i].Groupname + "');\">"

Previous
Next Post »