November 20th, 2000, 04:10 PM
I regularly make use of the technique of building and automatically submitting forms within a cgi-script. This is done to switch from one script to another when there is processing that has to be done after the last "physical" form submit - and to prevent providing parameters via a URL string (making them hidden fields instead).
My problem is that when this is done, I get an error in Netscape - 'transfer interrupted'. It still continues, but the message is confusing to the visitor. Does anyone know a way around this?
Any suggestions? I've tried putting a delay timer on the form.submit - but that doesn't help.
November 21st, 2000, 02:27 AM
this message appear in Netscape if you interrupted generation of document. probably, you call fuction which submits form within body of document, for example after definition of form. try to place call to event handler of document. i mean call your function by event 'onLoad' on body of document. little example:
var f = document.forms["myForm"];
<body bgcolor="#FFFFFF" onLoad="submitForm()">
<form name="myForm" action="...">
November 21st, 2000, 08:53 AM
Thanks again! I'll try this in some of my other scripts and will let you know if it doesn't work anywhere.
You're a life saver!