Forum Moderators: open

Message Too Old, No Replies

Submit button

How to take a user to another page after a submission

         

djkit

9:56 am on Jul 7, 2005 (gmt 0)

10+ Year Member



Hi there,

I have finally managed to get my form to submit using Java, so I recieve an email with the forms contents.
How do I take the user to another page after the form submission? a page to say thanks for submitting the form?

(I am a very beginner... so dont assume I know too much.. :)

Thanks

D

orhor

5:59 pm on Jul 7, 2005 (gmt 0)

10+ Year Member



I dont know if I will help you: If you really meant Java I take back, because I dont know anything about it, but if you meant Javascript (which is something completely different and has nothing to do with Java) try this:

because I dont know how looks your code I guess you used some submit-button in the form. Change the type of the button to 'button' so it will look like this:

<form name='myForm' action='mailto:adress@server.com' method='post'>

-------Your elements--------

<input type='button' value='Submit(or whatever)' onClick='javascript: myFunction();'>

</form>

and somewhere upper (somewhere inside the HEAD tag would be OK)put this code

<script language="JavaScript" type="text/javascript">
<!--
function myFunction(){
document.myForm.submit();
window.location="http://www.somepageyouknowwhat.com";
}
//-->
</script>