Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: submitting form to new window then effecting its values


Message #1 by "nick" <nick@i...> on Fri, 1 Mar 2002 13:33:54
This will do what you want:

<html>
<body>
<form name="frm" id="frm" action="http://www.microsoft.com" target="new">
Password: <input type="password" name="password" id="password">
<input name="cmdSubmit" id="cmdSubmit" value="Submit" type="button"
onclick="javascript:  SubmitMe();">
</form>
<script language="javascript">
	function SubmitMe(){
		document.frm.submit();
		document.frm.password.value = "";
	}
</script>
</body>
</html>

-----Original Message-----
From: nick [mailto:nick@i...]
Sent: Friday, March 01, 2002 9:08 AM
To: javascript
Subject: [javascript] RE: submitting form to new window then effecting
its- values


How can i submit the form from an external function?

i.e. what would i put in 'yourSubmitfunction' as you mention below.

> 
> what about...
> 
> onSubmit="yourSubmitfunction(); frm.txtPassword.value = '';"  
> 


  Return to Index