0

Hi,

I am repeatedly getting "missing ) after argument list" in firefox.

hash_a is a variable.

$("#details_a").append("</br>"+"Enter Name "+"<input type='text' id='myText' />"+"<input type='button' id='theSubmitButton' value='Edit Name' onclick='edit_data("+hash_a+")\'\'>");

Thanks.

5
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by Taywin
0

At the end of the statment you are escaping the two single quotes. I think that you only need one of them to complete the onclick code and I do not see anywhere else in the code where the single quote is escaped.

0
$("#details_a").append("</br>"+"Enter Name "+"<input type='text' id='myText' />"+"<input type='button' id='theSubmitButton' value='Edit Name' onclick='edit_data("+hash_a+")'/>");

I am still getting the same error.

0

Techie,

Try building your HTML string like this:

var strArray = [
	"</br>",
	"Enter Name ",
	"<input type='text' id='myText' />",
	"<input type='button' id='theSubmitButton' value='Edit Name' onclick='edit_data(",
	hash_a,
	")'/>"
];
$("#details_a").append(strArray.join(''));

The line number in the error message will give you a better clue.

There may be an apostrophe in hash_a , which is the same as single quote. If so then try either:
a) swapping double-quotes for single and vice versa.
b) passing escape(hash_a) to edit_data then unescape(...) inside the function.

Airshow

Edited by Airshow: n/a

0

Hi,

I am repeatedly getting "missing ) after argument list" in firefox.

hash_a is a variable.

$("#details_a").append("</br>"+"Enter Name "+"<input type='text' id='myText' />"+"<input type='button' id='theSubmitButton' value='Edit Name' onclick='edit_data("+hash_a+")\'\'>");

Thanks.

$("#details_a").append(
"<\/br>"+
"Enter Name "+
"<input type='text' id='myText' \/>"+
"<input type='button' id='theSubmitButton' value='Edit Name' onclick='edit_data("+
hash_a+
")'\/>");

Edited by Troy III: n/a

0

Are you sure that the error is actually occurred in this line? Could it possibly be from previous lines (incorrect parentheses matching)?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.