[thelist] Automatically clicking submit button?

J J squid_66 at yahoo.com
Tue Mar 19 11:27:01 CST 2002


Actually they fill out the form, then submit the data,
but once the data is submitted, I actually need to
submit another form (hidden).

It's not the same data from the first form, more like
a submit button with a bunch of hidden fields.

So once they fill out the first form, data is sent,
then I need a way to have this next Button clicked to
submit more data, hopefully without them having to
click it.

Clear as mud?  :)



--- Mark Howells <mark at mountain.ch> wrote:
> > I've got a form that users fill out, process some
> > information, then I need to send them onto the
> next
> > step.  Unfortunately, there's too much information
> to
> > be passed in the URL (or GET method) so I'm having
> to
> > setup a submit button and POST method.
> >
> > However, I don't want that user to have to stop
> and
> > click the "continue" button in this case, I'd
> rather
> > just somehow automatically click the button for
> the
> > user.  Hopefully they wouldn't even see the page
> come
> > up.
>
> When do you want the form to post itself? When all
> of the fields are
> completed? You could add a Javascript onblur
> function to all of the fields,
> which will fire document.form.submit() if all the
> fields are filled.
>
> This example will work with text and hidden fields.
>
> <input type="text" name="myField" onblur="sCheck()"
> />
>
> function checkfields(){
>  elms=document.myForm.elements;
>  for(ff=0;ff<elms.length;ff++){
>   if(elms[ff].value==""){return false;}
>  }
>  return true; // only fires if all fields have a
> value
> }
>
>  function sCheck(){
>   if(checkfields){document.myForm.submit();}}
>
> Regards
> Mark Howells
> <http://www.mark.ac/evl/>
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/



More information about the thelist mailing list