Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Firefox Javascript Issue

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Spacemail by SpaceshipSpacemail by 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
Close
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
Close
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
Close
document.form1.submit() should work
 
0
Close
Yeah, I thought that would work too...but it didn't! Something this simple shouldn't be so difficult.
 
0
Close
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
Close
At the top of the page is some php code. I want the form to submit after the php code is processed.
 
0
Close
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back