473,289 Members | 1,923 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,289 software developers and data experts.

Auto Form Submit

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

May 17 '06 #1
1 1432
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" <ma*******@gmail.com> wrote in message
news:11********************@g10g2000cwb.googlegrou 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

May 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Scott Castillo | last post by:
Does anybody know how to auto-submit a form in PHP without Javascript? For instance, submit form variables to self, validate the data in PHP on same page, then, if no errors, auto-submit the data...
9
by: scott | last post by:
I have a combo in LISTING 2 that I'm trying to force a sumbit when a user makes a change. Can anyone see why it doesn't fire LISTING 2 code? It just doesn't do anything. What I'm really trying to...
8
by: Prometheus Research | last post by:
http://newyork.craigslist.org/eng/34043771.html We need a JavaScript component which will auto-submit a form after a set period has elapsed. The component must display a counter that dynamically...
7
by: Brian | last post by:
hello, I am looking for a way to auto refresh a web page that I created, but also let the user choose to stop the auto refresh. I can not figure out how to stop the auto refresh. Any help would...
4
by: dschruth | last post by:
Hello. Can anybody solve this problem? I am using a server-side language (PERL) to *try* to POST data to a HTTPS login script that doesn't have a standard "submit" button. The form appears...
5
by: Navillus | last post by:
Hey gang, I have a login form that is empty by default, but can be filled with values from a previous form: <input type=text maxlength="40" size="40" name="user" value="`usr`"> <input...
1
by: kkuniya | last post by:
Situation : - A form (method : POST, action : itself, onsubmit : alert 'Submit' ) - Got 2 submit button ( 'Save' , 'View') - Got navigation 1|2|3|4 What I want to do : - Once clicked on the...
10
by: laredotornado | last post by:
Hi, I'm using php 5. Does anyone have any code or a function that auto submits a form that contains a single INPUT, of type = file? Thanks, - Dave
9
by: KingKen | last post by:
I am creating an ASP object that will recieve a table, a field for the table and the search text. I already have "edit objects" created for each table in my DB. what i need is a way to submit the...
1
AaronL
by: AaronL | last post by:
Hello, First I would like to say thank you all for your help in the past. I am stumped again. I am creating an e-commerce system and I want to be able to upload images to the server and...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.