...

View Full Version : onSubmit for a form



maitung
02-24-2003, 08:23 PM
What I'm trying to do is this:
After a user click on Submit button, they will be lead to another page. And here goes mine, but it doesn't work, please point out to me the mistakes:
<script language=javascript>
function success()
{
window.location="newpage.htm";}
</script>
<form method=some_method name=some_name onSubmit="success();" >
<input type=textarea >
<input type=submit value=go >
</form>

certainly I use a ready-made cgi file to send info, but what I need is loading the newpage.htm into the window.
Please help me with that basic thing to you but complicated to me.

arnyinc
02-24-2003, 08:34 PM
I don't understand exactly what you are trying to do. Do you want to submit the form in the same window, and then pop up a new window?

You can specify a target and post your form to a new window, if that helps.



<form method="GET" name="formname" target="_blank" action="processing.pl">

maitung
02-25-2003, 05:42 PM
No, the new page should be loaded in the same window, I mean I want to load the new page clientside-ly, not serversidely.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum