469,626 Members | 1,043 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

missing ) after argument list error

Hi all,
I try to call onchange a function and get "missing ) after argument
list" error
Probably systaxis issue
Thanks in advance for any help!

Code:

var html = "";
var myurl = "http://www.example.com/url.php?dummy=";
html += "<form id='idnumber' method='get' name='formnumber' action='#'
>";
// hier is the problem place
html += "<select name='name_sel' onchange='My_Function(myurl +
this.form.formnumber.options[this.form.name_sel.options.selectedIndex].value ,My_function_2 ,
parameter3)'>";

html += "<Option selected='selected' value='opt0'>option 0</option>";

var z
var ind = new Array("option 0","option 1","option 2");
for (z in ind)
{
html +="<option value" + ind[z] + ">" + ind[z] + "</option>";
}

html += "</select></form>";

Mar 30 '07 #1
5 2092
Vv_vV said the following on 3/30/2007 5:24 PM:
Hi all,
I try to call onchange a function and get "missing ) after argument
list" error
Probably systaxis issue
Thanks in advance for any help!

Code:

var html = "";
var myurl = "http://www.example.com/url.php?dummy=";
html += "<form id='idnumber' method='get' name='formnumber' action='#'
>";

// hier is the problem place
html += "<select name='name_sel' onchange='My_Function(myurl +
this.form.formnumber.options[this.form.name_sel.options.selectedIndex].value ,My_function_2 ,
parameter3)'>";
alert(html);

And see what it is. It may not be what you think it is.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 30 '07 #2
On Mar 30, 11:37 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
Vv_vV said the following on 3/30/2007 5:24 PM:
Hi all,
I try to call onchange a function and get "missing ) after argument
list" error
Probably systaxis issue
Thanks in advance for any help!
Code:
var html = "";
var myurl = "http://www.example.com/url.php?dummy=";
html += "<form id='idnumber' method='get' name='formnumber' action='#'
";
// hier is the problem place
html += "<select name='name_sel' onchange='My_Function(myurl +
this.form.formnumber.options[this.form.name_sel.options.selectedIndex].value ,My_function_2 ,
parameter3)'>";

alert(html);

And see what it is. It may not be what you think it is.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/
Hi, Randy
myurl variable doesn't work. it shows myurl instead of text in it
so I escaped properly:
var myurl = '\"http://www.example.com/url.php?dummy="';

with no luck

alert shows

<select name='name_sel' onchange='My_Function(myurl +
this.form.formnumber.options[this.form.name_sel.options.selectedIndex].value ,My_function_2 ,
parameter3)'>
don't know what to do...
Thanks a lot!

Mar 30 '07 #3
On Mar 31, 1:26 am, "Michael" <fj4sgcv5hy6d...@temporaryinbox.com>
wrote:
On Mar 30, 11:37 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
Vv_vV said the following on 3/30/2007 5:24 PM:
Hi all,
I try to call onchange a function and get "missing ) after argument
list" error
Probably systaxis issue
Thanks in advance for any help!
Code:
var html = "";
var myurl = "http://www.example.com/url.php?dummy=";
html += "<form id='idnumber' method='get' name='formnumber' action='#'
>";
// hier is the problem place
html += "<select name='name_sel' onchange='My_Function(myurl +
this.form.formnumber.options[this.form.name_sel.options.selectedIndex].value ,My_function_2 ,
parameter3)'>";
alert(html);
And see what it is. It may not be what you think it is.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/

Hi, Randy
myurl variable doesn't work. it shows myurl instead of text in it
so I escaped properly:
var myurl = '\"http://www.example.com/url.php?dummy="';

with no luck

alert shows

<select name='name_sel' onchange='My_Function(myurl +
this.form.formnumber.options[this.form.name_sel.options.selectedIndex].value ,My_function_2 ,
parameter3)'>
don't know what to do...
Thanks a lot!
I've also tried this
<select name='name_sel' onchange='My_Function(\"http://www.example.com/
url.php?dummy=\"' +
this.form.formnumber.options.name_sel[selectedIndex].value ,My_function_2 ,
parameter3)'>
no luck...

Mar 30 '07 #4
"Vv_vV" <ke****@gmail.comwrote in comp.lang.javascript:
Hi all,
I try to call onchange a function and get "missing ) after argument
list" error
Probably systaxis issue
Thanks in advance for any help!
// hier is the problem place
html += "<select name='name_sel' onchange='My_Function(myurl +
this.form.formnumber.options[this.form.name_sel.options.selectedIndex].
value ,My_function_2 , parameter3)'>";

Are breaking a string literal up on multiple lines??

Or is that your NNTP posting client wrapping lines?

If the former, your error is obvious, and you need to understand how to
continue a string literal on multiple lines.

Mar 31 '07 #5
On Mar 31, 9:13 am, Patient Guy <sevisen.adam@gmailDOTHEREcomwrote:
"Vv_vV" <ken...@gmail.comwrote in comp.lang.javascript:
Hi all,
I try to call onchange a function and get "missing ) after argument
list" error
Probably systaxis issue
Thanks in advance for any help!
// hier is the problem place
html += "<select name='name_sel' onchange='My_Function(myurl +
this.form.formnumber.options[this.form.name_sel.options.selectedIndex].
value ,My_function_2 , parameter3)'>";

Are breaking a string literal up on multiple lines??

Or is that your NNTP posting client wrapping lines?

If the former, your error is obvious, and you need to understand how to
continue a string literal on multiple lines.
Hi,
I know how to break the lines, that are wrapping lines

Mar 31 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Conrad Weyns | last post: by
1 post views Thread by soup_or_power | last post: by
9 posts views Thread by Ritesh Raj Sarraf | last post: by
5 posts views Thread by Hakusa | last post: by
4 posts views Thread by Pasquale | last post: by
19 posts views Thread by Spiros Bousbouras | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.