Dynadot โ€” .com Registration $8.99

Firefox Javascript Issue

Spaceship Spaceship
Watch

efriese

Established Member
Impact
0
I'm trying to automatically submit an HTML form with javascript. The code below works fine for IE, but not for Firefox. Does anyone know of a work around for this?

Code:
<SCRIPT LANGUAGE="Javascript">
<!--
document.forms("form1").submit()
//--></SCRIPT>
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Could you post a sample code i.e the form that your using aswell, so I could check it, and not just have the javascript, also a link to a demo of it would be nice, might allow people to look into it more.

PJ
 
0
•••
Here's the code:

Code:
<html>
<form method="post" id="form1" name="form1" action="https://payments.verisign.com/payflowlink">
<input type="hidden" name="LOGIN" value="">
<input type="hidden" name="PARTNER" value="Verisign">
<input type="hidden" name="AMOUNT" value="">
<input type="hidden" name="TYPE" value="S">
</form>
	  <SCRIPT LANGUAGE="Javascript">
	<!--
	document.forms["form1"].submit()
	//--></SCRIPT>
</html>

I can't really give a link to the site because it is on an intranet right now. Thanks for the help!
 
0
•••
document.form1.submit() should work
 
0
•••
Yeah, I thought that would work too...but it didn't! Something this simple shouldn't be so difficult.
 
0
•••
Did you suppy the whole code ?
When is the auto-submit supposed to trigger ?

If you want to submit the form on page load you would do something like this:
PHP:
<body onload="javascript: document.form1.submit();">

If you want to submit the form when the value of a combo is changed you would need something like this:
PHP:
<select onchange="javascript: document.form1.submit();">
And so on. I'm not sure about what you want to achieve.
 
0
•••
At the top of the page is some php code. I want the form to submit after the php code is processed.
 
0
•••
Dynadot โ€” .com Registration $8.99Dynadot โ€” .com Registration $8.99
Unstoppable Domains
Domain Recover
DomainEasy โ€” Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back