home *** CD-ROM | disk | FTP | other *** search
/ PC User 2005 May / CD / PCU0505CD.iso / software / full / coffecup / files / html2005.exe / %MAINDIR% / Javascript / FunStuff.xml < prev    next >
Encoding:
Text File  |  2005-02-16  |  2.0 KB  |  65 lines

  1. <ccResource>
  2.   <ccTitle>
  3. Quick Survey
  4.   </ccTitle>
  5.   <ccCategory>
  6. Fun Stuff
  7.   </ccCategory>
  8.   <ccDescription>
  9. This will ask the user if they want to fill out a survey.  If they do, they fill out the input boxes, then hit submit.  If they don't, they get a link to go to your page.
  10.   </ccDescription>
  11.   <ccInstructions>
  12. Place this script as the .html file.  The USER will then be redirected to your site.  Be sure to change the values below of the webpage and of your e-mail address.  VERY IMPORTANT!
  13.   </ccInstructions>
  14.   <ccHeadContent>
  15.   
  16.   </ccHeadContent>
  17.   <ccBodyContent>
  18. <SCRIPT LANGUAGE="JavaScript">
  19. //Modified by CoffeeCup Software 
  20. //This code is Copyright (c) 1998 CoffeeCup Software 
  21. //All rights reserved. License is granted to a single user to 
  22. //reuse this code on a personal or business Web Site. 
  23. <!--
  24.  
  25. ccsurvey=window.confirm ("Do you want to fill out a quick survey?")
  26.  
  27. if (ccsurvey==true) {
  28.  
  29. var name = prompt ('Please tell us your name','');
  30.  
  31. var age = prompt ('How old are you','');
  32.  
  33. var email = prompt ('What is your email address?','');
  34.  
  35. document.write("<FORM ACTION=http://www.cgi-free.com/mailer.cgi?youremail@yourprovider.com;http://www.yourpage.com method=post>")
  36.  
  37. document.write("<input type=hidden name=name value='" +name+"'>")
  38.  
  39. document.write("<input type=hidden name=age value='" +age+"'>")
  40.  
  41. document.write("<input type=hidden name=email value='" +email+"'>")
  42.  
  43. document.write("<CENTER>Please press <input type=submit name=sent value=SUBMIT> to send your information.</CENTER><P><HR>")
  44.  
  45. document.write("</FORM>")
  46. window.alert ('Thanks for filling out our survey.  Please press the [Submit] button.');
  47.  
  48. } else {
  49. window.alert ("Ok...be that way.");
  50. document.write("<CENTER><FONT SIZE=7><A HREF=http://www.coffeecup.com>CLICK HERE</A></FONT></CENTER>")
  51. }
  52. //-->
  53. </SCRIPT>
  54. <!-- END of Quick Survey JavaScript -->
  55.   </ccBodyContent>
  56.   <ccElementContent>
  57.   
  58.    <ccElementName></ccElementName>
  59.    <ccElementAction></ccElementAction>
  60.    
  61.   </ccElementContent>
  62.   <ccExtraData>
  63.  
  64.   </ccExtraData>
  65. </ccResource>