(I posted this message to the "AOL: Netscape" list yesterday, but didn't get any responses so I'll try here.)
I'm developing an order processing application that sends data between views using a form with the POST method.
We are using a 3rd party for credit card processing and do not receive any feedback, therefore I'm trying to use one button click to start two form submissions.
The starting page (for this issue) contains a list of products and a button for each product. The user is to click the button next to the product they would like to purchase. After clicking the button, two events should happen: (1) a new window should be created with the page to our outside credit card app, and (2) a new page from our own site that displays an order confirmation. The second page needs information from the first, so our order database can be updated.
The problem that is really baffeling me is that the code works fine with MS IE 5.5 and Netscape Navigator 6, but doesn't work in Navigator 4.
It works in 'debug-mode' when I place an (A)
before I change the variables, but I really don't want to have a message box pop-up just to get it to work. I've tried to use a (B)for-loop, but when I do, the 3rd party site never opens (or I never see it open).
JavaScript Code
//submit the form per FORM properties
//((A) message box that makes it work
//(B) for-loop that eliminates first submit
//change FORM variables to point to the new page
//submit the form to the new destination
Form Elements
I've also tried to placing
in the SUBMIT command, using both TYPE=SUBMIT and TYPE=BUTTON w/o the OnSubmit action of the form, but nothing works in Netscape 4.
Any thoughts/suggestions that someone would like to throw my way would be greatly appreciated, as I'm at my wits end.
Thanks -
I'm developing an order processing application that sends data between views using a form with the POST method.
We are using a 3rd party for credit card processing and do not receive any feedback, therefore I'm trying to use one button click to start two form submissions.
The starting page (for this issue) contains a list of products and a button for each product. The user is to click the button next to the product they would like to purchase. After clicking the button, two events should happen: (1) a new window should be created with the page to our outside credit card app, and (2) a new page from our own site that displays an order confirmation. The second page needs information from the first, so our order database can be updated.
The problem that is really baffeling me is that the code works fine with MS IE 5.5 and Netscape Navigator 6, but doesn't work in Navigator 4.
It works in 'debug-mode' when I place an (A)
Code:
alert()
JavaScript Code
Code:
<SCRIPT LANGUAGE="JavaScript">
function btnOrder (form_id) {
Code:
document[form_id].submit();
Code:
// alert('');
//(B) for-loop that eliminates first submit
Code:
// for (i=0; i<1000; i++) {
// ;
// }
//change FORM variables to point to the new page
Code:
document[form_id].target="_self";
document[form_id].action="confirmOrder.asp";
Code:
document[form_id].submit();
}
</SCRIPT>
Form Elements
Code:
<Form Method=POST Action="[URL unfurl="true"]http://cc.net/input.asp"[/URL] NAME="PB_1" TARGET="_blank" onSubmit="javascript:btnOrder('PB_1');">
...
<INPUT TYPE=SUBMIT NAME=SubmitPB VALUE="Buy">
..
</FORM>
I've also tried to placing
Code:
onClick="javascript:btnOrder('PB_1');"
Any thoughts/suggestions that someone would like to throw my way would be greatly appreciated, as I'm at my wits end.
Thanks -