Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Auto Form Submit

Reply
Thread Tools

Auto Form Submit

 
 
mazdotnet
Guest
Posts: n/a
 
      05-17-2006
Hi guys,

I have the following

<form name="formpurchase" id="formpurchase"
method=postaction="https://site.cgi">
<input type=hidden name="MerchantNumber" value="<%=MerchantNumber
%>">
<input type=hidden name="ReturnURL" value="<%=retURL %>">
<input type=hidden name="Products" value="<%=Products %>">

<input type=submit value="Continue" name="submit">
</form>

How do I make it so that submission is done automatically? (without
pressing the button)

I've added this but it says 'object doesn't support this property'
<script language="javascript">
<!--
if(document.all){
frm=document.all.formpurchase
}
if(document.getElementById){
frm=document.getElementById("formpurchase")
}
if (frm) frm.submit();
-->
</script>


Thanks
MA

 
Reply With Quote
 
 
 
 
bruce barker \(sqlwork.com\)
Guest
Posts: n/a
 
      05-17-2006
where did you place your script? it must come after the </form>, or better
yet, hook its firing to the onload event.

-- bruce (sqlwork.com)

"mazdotnet" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ps.com...
> Hi guys,
>
> I have the following
>
> <form name="formpurchase" id="formpurchase"
> method=postaction="https://site.cgi">
> <input type=hidden name="MerchantNumber" value="<%=MerchantNumber
> %>">
> <input type=hidden name="ReturnURL" value="<%=retURL %>">
> <input type=hidden name="Products" value="<%=Products %>">
>
> <input type=submit value="Continue" name="submit">
> </form>
>
> How do I make it so that submission is done automatically? (without
> pressing the button)
>
> I've added this but it says 'object doesn't support this property'
> <script language="javascript">
> <!--
> if(document.all){
> frm=document.all.formpurchase
> }
> if(document.getElementById){
> frm=document.getElementById("formpurchase")
> }
> if (frm) frm.submit();
> -->
> </script>
>
>
> Thanks
> MA
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Shipping Auto Shipping Scheduling:car moving auto transport linkswanted ASP .Net 1 11-22-2013 07:02 AM
submit 1 form to 2 servers or 2 forms to 2 server (1 form each) on 1 submit abansal.itp@gmail.com Javascript 3 06-23-2007 07:29 AM
submit the form data to the popup window without a submit button jrefactors@hotmail.com HTML 2 01-01-2005 06:07 AM



Advertisments