Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: submit form to popup


Message #1 by michael robertson <mike@m...> on Sun, 7 Apr 2002 15:04:17 -0400
I want to submit an ASP form to a new window and be able to validate
it first. This is my latest try. Is this possible? Any suggestions?

function validate(form) {
	var msg = "";
	if (!isEmpty(form.txtTime1.value)) msg += "-- Time of
today\'s activity\n";
	if (!isEmpty(form.txtAct1.value)) msg += "-- Today\'s activity\n";
	if (!isEmpty(form.txtTime4.value)) msg += "-- Time of
tommorrow\'s activity\n";
	if (!isEmpty(form.txtAct4.value)) msg += "-- Tommorrow\'s activity\n";

	if (msg != "") {
		alert("The following fields were blank: \n" + msg);
		return false;
	    }
	   return true;

openWindow('whyBeActivePrint1.asp','planWin','menubar=yes,scrollbars=yes,resizable=yes,width=470,height=500')
	  }


<form name="formActivity" onSubmit="return validate(this)"
method="get" target="planWin">

  Return to Index