CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript programming (http://www.codingforums.com/forumdisplay.php?f=2)
-   -   Want a thank you message to appear after the form has been submitted? How? (http://www.codingforums.com/showthread.php?t=285937)

samhor 01-17-2013 11:46 AM

Want a thank you message to appear after the form has been submitted? How?
 
Hello All,

I have created a form but i am unsure on how to add an a message to appear under the form just to say thank you under the form.

Philip M 01-17-2013 12:45 PM

Quote:

Originally Posted by samhor (Post 1306857)
Hello All,

I have created a form but i am unsure on how to add an a message to appear under the form just to say thank you under the form.

When a form is submitted the page is refreshed. You will need to use server-side coding if you want to display a message after the form submits.


There are two i's in Hendry, aren't there? - Commentator Radio 5 Live

samhor 01-17-2013 12:47 PM

Quote:

Originally Posted by Philip M (Post 1306868)
When a form is submitted the page is refreshed. You will need to use server-side coding if you want to display a message after the form submits.


There are two i's in Hendry, aren't there? - Commentator Radio 5 Live

Thanks.. Just want to keep it simple at the moment.. Maybe in the future

jalarie 01-25-2013 08:20 PM

Code:

<script type="text/javascript">
function check() {
  document.forms[0].OK.focus();
  document.forms[0].OK.blur();
  return true;
}
</script>

<form ... onsubmit="return check();">
  ...
  <input type="text" id="OK" onblur="location.href='Submitted.htm';" />
</form>


felgall 01-25-2013 09:13 PM

Quote:

Originally Posted by samhor (Post 1306857)
Hello All,

I have created a form but i am unsure on how to add an a message to appear under the form just to say thank you under the form.

The form will not be on the page after it has been submitted unless you include it in the page that you are submitting it to as well - which is rather pointless unless your server side script needs to display errors.

To display a thankyou message after the form is submitted simply include that in the HTML of the page that displays after the form is submitted.


All times are GMT +1. The time now is 02:54 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.