473,386 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 2249
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Conrad Weyns | last post by:
vc7.1 has no problem with the following snippet: template <typename T> class TTest { std::list<T*>::iterator m_It; }; but metrowerks codewarrior 9.2 kicks my butt and online Comeau confirms:...
1
by: soup_or_power | last post by:
I'm passing the return from window.open as a function argument and getting the error "missing ] after element list" when tested with FireFox. Here is the relevant code. Many thanks for your help....
102
by: Skybuck Flying | last post by:
Sometime ago on the comp.lang.c, I saw a teacher's post asking why C compilers produce so many error messages as soon as a closing bracket is missing. The response was simply because the compiler...
9
by: Ritesh Raj Sarraf | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm using optparse module to parse all options and arguments. My program uses mostly "option arguments" hence my len(args) value is always...
5
by: Hakusa | last post by:
I have the argument items in my class room. class room: def __init__(self, name, description, items*): I thought I remembered from a tutorial I read once, and I've read so many I feel like an...
2
by: ehsansad | last post by:
I have the following code. function updateTermsList() { var termDivBox = document.getElementById("termarea"); var terms = searchXMLHttp.responseXML.getElementsByTagName("term"); ...
4
by: Pasquale | last post by:
I am attempting to populate a few select drop down menus from the selection of the first drop down. I am using ajax to submit data via a PHP GET and from the response populate the other drop down...
19
by: Spiros Bousbouras | last post by:
Every time I've seen an example of a variable argument list function its functionality was to print formatted output. Does anyone have examples where the function is not some variation of printf ?
1
by: hariomt | last post by:
Hi, i have to create table's rows dynamically. I am using bellow code snipet... function copySelectedAttr() { var attrValue=...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.