Posted By

icecreamboyy on 02/23/11


Tagged

css html forms


Versions (?)

Form Processor


 / Published in: CSS
 

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html>
  4. <head>
  5. <title>Form Processor</title>
  6. </head>
  7. <body>
  8. <script type="text/javascript">
  9. <!-- HIDE FROM INCOMPATIBLE BROWSERS
  10. document.write("<h1>Your form has been submitted!</h1><h2>You entered the following data:</h2>");
  11. var formData = location.search;
  12. formData = formData.substring(1, formData.length);
  13. while (formData.indexOf("+") != -1) {
  14. formData = formData.replace("+", " ");
  15. }
  16. formData = unescape(formData);
  17. var formArray = formData.split("&");
  18. for (var i=0; i < formArray.length; ++i) {
  19. document.writeln(formArray[i] + "<br />");
  20. }
  21. // STOP HIDING FROM INCOMPATIBLE BROWSERS -->
  22. </script>
  23. </body>
  24. </html>

Report this snippet  

You need to login to post a comment.