PDA

View Full Version : form onsubmit


webbie
08-18-2004, 02:20 PM
I have a form that I am wanting to run three different onsubmit actions in the form. How do you get more than one to run?

pyrexyn
08-18-2004, 02:28 PM
If there is javascript function equivalent to "submit", I'm sure you can use a JS snippet that simply submits to three different places.

Otherwise, put it in the script that the "action" attribute sends to. If it goes to some PHP file, just make that one PHP file link to the other actions you want to take.

webbie
08-18-2004, 02:37 PM
I have 3 different javascripts running for the 3 submits but how do I get them all to work together? I'm not sure I understand how to use JS snippet.

pyrexyn
08-18-2004, 03:23 PM
oh sorry, "snippet" just meant a code.

i'm not sure how your form is handling things. are you using any PHP or ASP or something like that which your form sends the information to? or is this an only-javascript thing?

webbie
08-18-2004, 03:27 PM
I use asp for all of the actual form events, the javascript are all doing simple procedures but all need to be done onsubmit.

Here are the javascripts I'm using:

<script language="Javascript1.2"><!-- // load htmlarea
_editor_url = "../../htmlarea/"; // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
document.write(' language="Javascript1.2"></scr' + 'ipt>');
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
// --></script>
<SCRIPT LANGUAGE="JavaScript">
function openpopup(){
var popurl="eeoc.html"
winpops=window.open(popurl,"","width=600,height=600,scrollbars=yes")
}

</script>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function submitForm(s) {
s.value = " Sending... ";
return true;
}
// End -->
</script>