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