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

  1. <ccResource>
  2.   <ccTitle>
  3. ImageForm
  4.   </ccTitle>
  5.   <ccCategory>
  6. Images
  7.   </ccCategory>
  8.   <ccDescription>
  9. This will create a form where you can have images as the SUBMIT and RESET buttons.  The Reset button will not work in IE.  
  10.   </ccDescription>
  11.   <ccInstructions>
  12. Place part of this script in between the HEAD tags and the other part in the BODY of your webpage. Change the size and color of the text to suit your liking.  The FORM is designed to work off of the users e-mail program but you can change the ACTION 
  13. in the form to reflect a CGI script such as FormMail.  Keep in mind you will need to rename the submitbutton.gif and the resetbutton.gif to the images you will be using in your webpage.
  14.   </ccInstructions>
  15.   <ccHeadContent>
  16.   <SCRIPT LANGUAGE="JavaScript">
  17. //Modified by CoffeeCup Software 
  18. //This code is Copyright (c) 1997 CoffeeCup Software 
  19. //all rights reserved. License is granted to a single user to 
  20. //reuse this code on a personal or business Web Site. 
  21.  
  22. function proc() {    
  23.  
  24.     document.forms[0].reset()
  25.  
  26. }
  27.  
  28.  
  29.  
  30. function announce() {
  31.  
  32.     alert('Submitting your information now...')
  33.  
  34. }
  35.  
  36.  
  37.  
  38. function respond() {
  39.  
  40.     alert('Your data has been erased.')
  41.  
  42. }
  43.  
  44. </SCRIPT>
  45.   </ccHeadContent>
  46.   <ccBodyContent>
  47.  
  48. <FORM METHOD="POST" ACTION="mailto:you@yourdomain.com" onSubmit="announce()" onReset="respond()">
  49.  
  50. <FONT FACE="VERDANA,ARIAL" SIZE=4>
  51. <P>
  52. <DT><B>Name:</B> 
  53. <DD><INPUT TYPEe="text" SIZE="20" NAME="Name">
  54. <P>
  55. <DT><B>E-Mail Address:</B> 
  56. <DD><INPUT TYPEe="text" SIZE="20" NAME="E-Mail">
  57. <P>
  58. <DT><B>State:</B> 
  59. <DD><INPUT TYPEe="text" SIZE="20" NAME="State">
  60.  
  61.    
  62. <P>
  63. <INPUT TYPE="image" SRC="submitbutton.gif" BORDER=0>
  64.  
  65. <A HREF="#form" onClick="proc()">
  66. <IMG SRC="resetbutton.gif" BORDER=0></A>
  67.  
  68.  
  69. </FORM>
  70.  
  71. <P><BR>
  72.   </ccBodyContent>
  73.   <ccElementContent>
  74.   
  75.    <ccElementName></ccElementName>
  76.    <ccElementAction></ccElementAction>
  77.    
  78.   </ccElementContent>
  79.   <ccExtraData>
  80.  
  81.   </ccExtraData>
  82. </ccResource>