Thread View: comp.lang.javascript
4 messages
4 total messages
Started by Nils Lastein
Thu, 14 Jun 2001 17:03
Trouble using the comma character in a form input name
Author: Nils Lastein
Date: Thu, 14 Jun 2001 17:03
Date: Thu, 14 Jun 2001 17:03
15 lines
1717 bytes
1717 bytes
I've got a simple HTML-form. Unfornunately the field names is writting using a comma like this: <input type="submit" name="abc,ABC" value=" NEXT "> This is valid using serverside CGI-applications. But "clicking" the submit-button using javascript is difficult because: formName.abc,ABC.click(); isn't valid. year year... You'll say: "Rename the submit button"... But I'm not able to do that, because it's generated serverside by a media asset management software (Cumulus). Reply plz using email Nils
Re: Trouble using the comma character in a form input name
Author: Matt Kruse
Date: Thu, 14 Jun 2001 18:03
Date: Thu, 14 Jun 2001 18:03
14 lines
1592 bytes
1592 bytes
Nils Lastein <nila@dsr.kvl.dk> wrote: > I've got a simple HTML-form. Unfornunately the field names is writting using > a comma like this: > <input type="submit" name="abc,ABC" value=" NEXT "> This is not a valid input name according to the HTML specifications. So, you can't expect it to work. Why would you want to .clik() this object, anyway? It's a submit button. Just call the form.submit() yourself. Matt Kruse http://www.mattkruse.com/
Re: Trouble using the comma character in a form input name
Author: Nils Lastein
Date: Thu, 14 Jun 2001 18:19
Date: Thu, 14 Jun 2001 18:19
26 lines
2083 bytes
2083 bytes
"Matt Kruse" <mkruse@netexpress.net> wrote in message news:3b28fba7$0$23242@wodc7nh0.news.uu.net... > Nils Lastein <nila@dsr.kvl.dk> wrote: > > I've got a simple HTML-form. Unfornunately the field names is writting > using > > a comma like this: > > <input type="submit" name="abc,ABC" value=" NEXT "> > > This is not a valid input name according to the HTML specifications. So, you > can't expect it to work. > > Why would you want to .clik() this object, anyway? > It's a submit button. Just call the form.submit() yourself. There are several submit forms... nice huh? ie: <FORM METHOD="GET" ACTION="cuwp_cgi"> <INPUT name="B_X_TN,QPN1" type=submit value=" Previous "> <INPUT name="B_X_TN,QPN3" type=submit value=" Next "> .... I want to "fake" a click on the "Next" button? Nils
Re: Trouble using the comma character in a form input name
Author: Grant Wagner
Date: Thu, 14 Jun 2001 19:40
Date: Thu, 14 Jun 2001 19:40
48 lines
2980 bytes
2980 bytes
Nils Lastein wrote: > "Matt Kruse" <mkruse@netexpress.net> wrote in message > news:3b28fba7$0$23242@wodc7nh0.news.uu.net... > > Nils Lastein <nila@dsr.kvl.dk> wrote: > > > I've got a simple HTML-form. Unfornunately the field names is writting > > using > > > a comma like this: > > > <input type="submit" name="abc,ABC" value=" NEXT "> > > > > This is not a valid input name according to the HTML specifications. So, > you > > can't expect it to work. > > > > Why would you want to .clik() this object, anyway? > > It's a submit button. Just call the form.submit() yourself. > > There are several submit forms... nice huh? > > ie: > <FORM METHOD="GET" ACTION="cuwp_cgi"> > <INPUT name="B_X_TN,QPN1" type=submit value=" Previous "> > <INPUT name="B_X_TN,QPN3" type=submit value=" Next "> > .... > > I want to "fake" a click on the "Next" button? > > Nils <input type="button" value="Fake click on Next" onclick="document.forms[0].elements['B_X_TN,QPN3'].click();"> Works in the following browsers: IE 5.01SP2, Netscape 4.61 and Mozilla 0.9.1+ Mozilla/5.0 (Windows; U; Win95; en-US; rv:0.9.1+) Gecko/20010613 Of course, you just move the onclick event code (document.forms[0].elements['B_X_TN,QPN3'].click();) to wherever you want to fake the clicking of "Next". -- | Grant Wagner <gwagner@ugg.com> * Client-side Javascript and Netscape DOM Reference available at: * http://developer.netscape.com/docs/manuals/javascript.html * Internet Explorer DOM Reference available at: * http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtmlrefs.asp * Tips for upgrading JavaScript for Netscape 6/Mozilla * http://www.mozilla.org/docs/web-developer/upgrade_2.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads