[Javascript] Try to submit a form

Trey H tutwabee at hotmail.com
Tue Jun 18 23:08:11 CDT 2002


To submit via code type document.formname.submit().  Just make a function 
that the button calls that submits both.

====================================
Trey: tutwabee at hotmail.com
Get free JavaScripts at the Blue Dragon!
Just go to:
http://www.websiter.biz
====================================
Make money by being online:
http://www.degoo.com/index.php?refid=tutwabee
===================================
Earn free traffic for your website easily:
http://tools.addme.com/servlet/popview?id=52260
====================================


>From: Andrew Dunn <andrew at d2k.com.au>
>Reply-To: javascript at LaTech.edu
>To: "'javascript at LaTech.edu'" <javascript at LaTech.edu>
>Subject: RE: [Javascript] Try to submit a form
>Date: Wed, 19 Jun 2002 14:07:43 +1000
>
>Hi,
>
>I'ts an intranet app, so there is no problems with that. I don't really 
>want
>the forms to multi-submit I only want one to submit at a time. I have added
>a submit button to each and that works well, but I can't submit via code.
>
>-----Original Message-----
>From: Peter Brunone [mailto:peter at brunone.com]
>Sent: Wednesday, 19 June 2002 2:08 PM
>To: javascript at LaTech.edu
>Subject: RE: [Javascript] Try to submit a form
>
>
>
>	This may be a dumb question, but have you tried removing the
>visibility criteria to see if the forms will multi-submit at all?
>	Also, is this an internet or intranet site?  If the former, then you
>may run into problems if vital functions depend on the viability of client
>scripting (you've probably already thought this through, but just in case,
>there it is).
>
>-Peter
>
>|-----Original Message-----
>|From: javascript-admin at LaTech.edu
>|[mailto:javascript-admin at LaTech.edu]On
>|Behalf Of Andrew Dunn
>|
>|Peter,
>|
>|The forms are each aimed at a different page, here is a tag from one:
>|
>|<form method=post action="script_pages/new_ef_script.asp" name=efs
>|id=efs>
>|
>|Here also is a <a> tag that when clicked will call the form to submit,
>|I have images simulating tabs (like on a windows application)
>|
>|<a
>|onclick="check_for_save();
>|change_div('the_notes','deposit','resident','personal','enquiry','ef');
>|window.status='EF Member Information'" href="javascript:void(0)">
>|<img border="0" src="images/buttons/ef_tab.jpg">
>|</a>
>|
>|I really don't know why it won't submit, it's a bit strange.
>|
>|Andrew.
>|
>|-----Original Message-----
>|From: Peter Brunone [mailto:peter at brunone.com]
>|
>|Andrew,
>|
>|	I could be wrong, but once you submit a form which targets the
>current
>|page, don't you lose control of that page?  You might have to aim the
>|form somewhere else (either another frame or another window).
>|
>|-Peter
>|
>||-----Original Message-----
>||From: javascript-admin at LaTech.edu
>||[mailto:javascript-admin at LaTech.edu]On
>||Behalf Of Andrew Dunn
>||
>||Hi there,
>||
>||I have 5 forms on one page when I try to submit the first form
>||(form[0]), it's ok and the form submits, but when I try to submit
>||another form (eg
>||form[2]) it doesn't appear that the form does anything and certainly
>||doesn't put anything in to the database.
>||
>||Some code is below (see line with ***) the condition on submitting a
>||form is the visibility of a div, as I have a few div's which appear as
>||tabs.
>||
>||if (eval("visible_1.style.visibility == 'visible'")) {
>||			//submit personal info (including notes)
>||			document.forms[0].submit();
>||		}
>||		else if (eval("visible_2.style.visibility == 'visible'")) {
>||			//submit personal info (including notes)
>||			document.forms[0].submit();
>||		}
>||		else if (eval("visible_3.style.visibility == 'visible'")) {
>||			alert("enquiry");
>||		}
>||		else if (eval("visible_4.style.visibility == 'visible'")) {
>||			//***
>||			document.forms[2].submit();
>||		}
>||		else if (eval("visible_5.style.visibility == 'visible'")) {
>||			alert("deposit");
>||		}
>||		else if (eval("visible_6.style.visibility == 'visible'")) {
>||			alert("resident");
>||		}
>||
>||Would anyone know why this form would not submit?
>||
>||Thanks.
>||Andrew.
>||
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript






_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.




More information about the Javascript mailing list