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

  1. <ccResource>
  2.   <ccTitle>
  3. E-mail Form
  4.   </ccTitle>
  5.   <ccCategory>
  6. Email
  7.   </ccCategory>
  8.   <ccDescription>
  9. This will send you an e-mail with whatever your visitor enters in the fields.
  10.   </ccDescription>
  11.   <ccInstructions>
  12. Place this entire script where you want the form to show up on the page.  You can change the values (Name, E-mail, Phone, etc.)  Just be sure to change that fields value in the script.  See where is says, "document.ccform.name.value", that is for the input field "name".  BE SURE TO CHANGE THE E-MAIL ADDRESS BELOW.  Currently it's at 'you@yourprovider.com'.
  13.  
  14. FUNCTIONALITY: Works in both Netscape and IE.  ONLY WORKS IF THE VISITOR HAS THEIR E-MAIL SET UP ON THEIR BROWSER.  
  15.   </ccInstructions>
  16.   <ccHeadContent>
  17.   
  18.   </ccHeadContent>
  19.   <ccBodyContent>
  20. <SCRIPT LANGUAGE=JavaScript>
  21. //Modified by CoffeeCup Software 
  22. //This code is Copyright (c) 1998 CoffeeCup Software 
  23. //All rights reserved. License is granted to a single user to 
  24. //reuse this code on a personal or business Web Site. 
  25. <!--  
  26.   if (navigator.appVersion.lastIndexOf('Win') != -1) {
  27.       dropline = "\r\n"  } else { dropline = "\n" }
  28. function coffeemsg(form) {
  29. document.ccform.Message.value = (
  30.    '  ' + dropline + dropline
  31.   + '-----CoffeeCup AutoMated E-Mail Form---START----- ' + dropline
  32.   + dropline + dropline 
  33.   + 'Name     : ' + document.ccform.name.value + dropline
  34.   + 'Phone    : ' + document.ccform.phone.value + dropline
  35.   + 'Subject  : ' + document.ccform.subject.value + dropline
  36.   + 'E-mail    : ' + document.ccform.email.value + dropline
  37.   + 'Message: ' + document.ccform.message.value
  38.   + dropline  + dropline
  39.   + '-----CoffeeCup AutoMated E-Mail Form----END------ ' + dropline
  40.   + dropline + 'E-Mail Form JavaScript by:' + dropline
  41.   + 'http://www.coffeecup.com' + dropline
  42.   + dropline + dropline 
  43.   + ' FIELD VALUES: ' + dropline
  44.   + '  ' + dropline
  45. );
  46. }
  47. // -->
  48. </SCRIPT>
  49.  
  50. <FORM name="ccform" method="post" action="mailto:you@yourprovider.com?subject=Message"
  51.  enctype="text/plain">
  52. <INPUT type=hidden name="Message">
  53.  
  54. <FONT FACE="VERDANA, ARIAL"><B>Name:</B></FONT><P>
  55. <INPUT type="text" size=25 name="name" onChange="coffeemsg()">
  56.  
  57. <P>
  58. <FONT FACE="VERDANA, ARIAL"><B>Phone:</B><P>
  59. <INPUT type="text" size=25 name="phone" onChange="coffeemsg()">
  60.  
  61. <P>
  62. <FONT FACE="VERDANA, ARIAL"><B>Email:</B></FONT><P>
  63. <INPUT type="text" size=25 name="email" onChange="coffeemsg()">
  64.  
  65. <P>
  66. <FONT FACE="VERDANA, ARIAL"><B>Subject:</B></FONT><P>
  67. <INPUT type="text" size=25 name="subject" onChange="coffeemsg()">
  68.  
  69. <P>
  70. <FONT FACE="VERDANA, ARIAL"><B>Message:</B></FONT><P>
  71. <TEXTAREA rows=5 cols=45 wrap="auto" name=message onChange="coffeemsg()"></TEXTAREA>
  72.  
  73. <P>
  74. <CENTER>
  75. <INPUT type=submit value="Send Message" onClick="coffeemsg()">
  76. </CENTER>
  77. </FORM>
  78. <P>
  79.   </ccBodyContent>
  80.   <ccElementContent>
  81.   
  82.    <ccElementName></ccElementName>
  83.    <ccElementAction></ccElementAction>
  84.    
  85.   </ccElementContent>
  86.   <ccExtraData>
  87.  
  88.   </ccExtraData>
  89. </ccResource>