Jump to content

ghost

Members
  • Posts

    23
  • Joined

  • Last visited

ghost's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I didn't want to send the file via Outlook, however. When I do that to the form action, Outlook opens to send the message. The whole point of the email form was to send it via HTML and not via Outlook. Am I missing something with your post?
  2. Ok, I have gotten my form to process via a .php file. However, when the message is sent to the designated email address, none of the user inputs appear in the message. That was part of the goal here, i.e. to allow a user to input information and then have it sent from a form to a designated email address. Here is my code for both the .html file and the .php file. Can someone tell me what is wrong?HTML<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Joe and Joan - Contact Us</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><!-- Links to other pages --><body text="#000000" link="#000000" vlink="#0066FF"><p align="center"><a href="ContactUstest.html">Contact Us</a> :: <ahref="Accommodations.htm">Accommodations</a>:: <a href="Engagementtest.htm">Engagement</a> :: <a href="Weddingtest.htm">Wedding</a>:: <a href="Registrytest.htm">Registry</a> :: <a href="Married%20Gueststest.htm">MarriedGuests</a> :: <a href="Golf%20Tournamenttest.htm">Golf Tournament</a> :: <ahref="AustinTXtest.htm">Austin,TX</a></p><!-- Now let's interact with the user and get some information --><!-- Set how this form is handled --><form action="confirm.php" method="post" enctype="text/plain"><h3>This form sends an e-mail to Joe and Joan</h3><!-- Get inputs from user and remember to verify data types in confirm.php -->Your Name:<br><input name="name" value="" size="20" type="text"> <br>Email Address:<br><input name="mail" value="" size="20" type="text"> <br>Subject:<br><input name="subject" value="" size="20" type="text"> <br>Message: <br><textarea rows="12" name="message" cols="60"></textarea> <br> <br> <!-- Create the UI control to send message --> <input value="Send Message" type="submit"> <input value="Reset" type="reset"> </p></form><p><script type="text/javascript">function tS(){ x=new Date(); x.setTime(x.getTime()); return x; }function lZ(x){ return (x>9)?x:'0'+x; }function tH(x){ if(x==0){ x=12; } return (x>12)?x-=12:x; }function y2(x){ x=(x<500)?x+1900:x; return String(x).substring(2,4) }function dT(){ window.status=''+eval(oT)+''; document.getElementById('tP').innerHTML=eval(oT); setTimeout('dT()',1000); }function aP(x){ return (x>11)?'pm':'am'; }var dN=new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'),mN=new Array('January','February','March','April','May','June','July','August','September','October','November','December'),oT="dN[tS().getDay()]+''+','+' '+mN[tS().getMonth()]+' '+(tS().getDate())+''+','+' 20'+y2(tS().getYear())+' '+'-'+' '+tH(tS().getHours())+':'+lZ(tS().getMinutes())+':'+lZ(tS().getSeconds())+' '+aP(tS().getHours())";if(!document.all){ window.onload=dT; }else{ dT(); }</script></p></body></html> PHP <?php //use simple algorithm to get user info. there is no input validation or //success var for email transfer. //get Name, email, subject, and message from form and set process vars $visitor_name = $_POST['name']; $visitor_email = $_POST['mail']; $visitor_subject = $_POST['subject']; $visitor_message = $_POST['message']; //set your email parameters $to_address = 'info@joeandjoan.net'; $subject = 'Information from your website contact form'; $mail_content = 'Visitor Name: '.$visitor_name."\n" .'Visitor Email Address: '.$visitor_email."\n" .'Email Subject: '.$visitor_subject."\n" .'Visitor Message: '.$visitor_message."\n"; $from_address ='www.joeandjoan.net'; //now send it! mail($to_address, $subject, $mail_content, $from_address); //tell user information was successfully processed echo '<p>Your message was sent successfully to Joe and Joan at '; echo date('H:i a, F jS, Y'); echo '</p>'; //that's it ?>
  3. ghost

    Drop Down Menu

    That's some good info. I can create a one button drop down menu in Fireworks from this link (http://www.entheosweb.com/website_design/drop_down_menus.asp), but then can't figure out how to put those individual buttons I create into on nav bar. I like the way Fireworks set's it up. I might try and utilitze your example if I can't figure out the Fireworks and Dreamweaver method. Thanks for everyone's help.
  4. ghost

    Drop Down Menu

    That is what I am looking for except, I want the main menu to be horizontal and then have the actual drop down portion vertical underneat the main menu. This link shows how to do it and I can accomplish it. However, I don't know how to turn each menu item I create into a navigation bar. When I try to create the nav bar in dreamweaver, the preview doesn't show the drop down menu.
  5. How do I build a drop down menu that goes horizontally? I have seen examples with the menu vertical on either side of the page, but not any examples for horizontal drop down menus. Can anyone help or point me to an example? Thanks so much.
  6. ghost

    time & date

    I am trying to keep the code I have, but just modify it. Surely it can be modified other than how I have it. However, it's not like I wll be around to see 2100, so maybe I ought to leave well enough alone.
  7. ghost

    time & date

    I am trying to do a time and date script as well. I have figured everything out except for how to get the year to be "2005" rather than "05" for example. The only think that I could find to make it work is to physically type in "20" before the code in the script that calls the year. I know there must be a way to do it so the script gets it automatically, but I can't figure it out. Can anyone help me? Here is the java script: <script type="text/javascript">function tS(){ x=new Date(); x.setTime(x.getTime()); return x; }function lZ(x){ return (x>9)?x:'0'+x; }function tH(x){ if(x==0){ x=12; } return (x>12)?x-=12:x; }function y2(x){ x=(x<500)?x+1900:x; return String(x).substring(2,4) }function dT(){ window.status=''+eval(oT)+''; document.getElementById('tP').innerHTML=eval(oT); setTimeout('dT()',1000); }function aP(x){ return (x>11)?'pm':'am'; }var dN=new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'),mN=new Array('January','February','March','April','May','June','July','August','September','October','November','December'),oT="dN[tS().getDay()]+''+','+' '+mN[tS().getMonth()]+' '+(tS().getDate())+''+','+' 20'+y2(tS().getYear())+' '+'-'+' '+tH(tS().getHours())+':'+lZ(tS().getMinutes())+':'+lZ(tS().getSeconds())+' '+aP(tS().getHours())";if(!document.all){ window.onload=dT; }else{ dT(); }</script></p>
  8. But the code you wrote was to be used as .php, right? So how can that work with the form I have? You know what...I think I need to just start over. I am getting confused here.This info is what I know. Correct me if I am wrong. To do what I am asking, i.e. sending email via a form in a webpage you need:1) a page with the form coded in html2) a page performing the action of the form, coded in .php or .asp or whateverDon't the two pages have the same code with the exception of the additional .asp or .php code?
  9. Man, nothing works. I must be doing something wrong still. In NVU, the .php code disappears.
  10. But don't I have to have an .html page with the form in it first or is this page include everything? I think we had this discussion before, but I wanted to verify.
  11. Ok, I still haven't figured this form/mail thing out. Here are my codes for the form and then for the .PHP. Can someone tell me what is wrong?Form Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>Joe and Blow - Contact Us</title></head><body style="color: rgb(0, 153, 0); background-color: rgb(51, 204, 255);" leftmargin="5" topmargin="0" alink="#000099" link="#009900" marginheight="0" marginwidth="5" vlink="#990099"><form action="confirm.php" method="post" enctype="text/plain"> <h3>This form sends an e-mail to Joe and Blow</h3>Your Name:<br> <input name="name" value="" size="20" type="text"> <br>Email Address:<br> <input name="mail" value="" size="20" type="text"> <br>Subject:<br> <input name="subject" value="" size="20" type="text"> <br>Message: <br> <textarea rows="12" name="message" cols="60"></textarea> <br> <br> <input value="Send Message" type="submit"> <input value="Reset" type="reset"></form><form method="post" action="joeblow@gmail.com" id="form1" name="form1"> <a href="HomePage.html#Home">Home</a> <br> <a href="form.html#form">Enquiry Form</a> <br> <br> <p><span id="tP"> </span> <script type="text/javascript">function tS(){ x=new Date(); x.setTime(x.getTime()); return x; }function lZ(x){ return (x>9)?x:'0'+x; }function tH(x){ if(x==0){ x=12; } return (x>12)?x-=12:x; }function y2(x){ x=(x<500)?x+1900:x; return String(x).substring(2,4) }function dT(){ window.status=''+eval(oT)+''; document.getElementById('tP').innerHTML=eval(oT); setTimeout('dT()',1000); }function aP(x){ return (x>11)?'pm':'am'; }var dN=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'),mN=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'),oT="dN[tS().getDay()]+' '+(tS().getDate())+' '+mN[tS().getMonth()]+' '+y2(tS().getYear())+' '+'-'+' '+tH(tS().getHours())+':'+lZ(tS().getMinutes())+':'+lZ(tS().getSeconds())+' '+aP(tS().getHours())";if(!document.all){ window.onload=dT; }else{ dT(); } </script></p></form></body></html> .PHP Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>Joe and Blow - Confirm</title></head><body><?php <BODY BGCOLOR="#FFFFFF"><%if ((!$realname ) or (!$telephone) && (!$email)) {echo "Please Enter a Contact Name and either a Telephone Number or an Email address for Contact purpose's.Thank You";echo "<p>";echo "Please use the 'Back' button to continue.";echo "</p>";echo "<a href='/form.html' onclick='self.history.back();'>Back</a>";exit;} $message="Name: $realname\n\n"."Organisation: $organisation\n\n"."Address:\n$address_line_1\n\n"."Post Code: $postcode\n\n"."Telephone: $telephone\n\n"."Fax: $fax\n\n"."Email: $email\n\n"."Message: \n".$text;mail("joeblow@gmail.com","$subject","$message","From:Form.$email\r\nReply-to:$email");echo "<p>Thank you for completing our contact form. Your details have been forwarded and we will be in contact within 2 working days.</p>";echo "<p>From: $email</P>";echo "<p>Subject: $subject</p>";echo "<p>Message: </p>";echo "<p>";echo $text;echo "</p><a href='/HomePage#Home.html'><b>Return to the Home Page</b></a>";%></BODY></HTML>?><br></body></html>
  12. I am new at all these server scripting languages, so bear with me. I am trying to do the same thing with a form, i.e. send comments and conctact info to me via an email form on my website.With .ASP, do you have to create the form page and then also create the "action" page. I am trying to follow your code from that link you provided. However, I didn't see the code you show in this post. Is that the code that you have for when a person submitts his or her info to your site and it's just uploaded to your host service?I still haven't been able to figure out how to send the info I request of the user (from the form) to my email via the form in HTML. I have code for the form, but I guess the trouble I am having is with the "action" code.
  13. Here is my code for the nav bar:<script language="JavaScript" type="text/JavaScript"><!--function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_nbGroup(event, grpName) { //v6.0 var i,img,nbArr,args=MM_nbGroup.arguments; if (event == "init" && args.length > 2) { if ((img = MM_findObj(args[2])) != null && !img.MM_init) { img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src; if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array(); nbArr[nbArr.length] = img; for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = img.MM_dn = args[i+1]; nbArr[nbArr.length] = img; } } } else if (event == "over") { document.MM_nbOver = nbArr = new Array(); for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up); nbArr[nbArr.length] = img; } } else if (event == "out" ) { for (i=0; i < document.MM_nbOver.length; i++) { img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; } } else if (event == "down") { nbArr = document[grpName]; if (nbArr) for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; } document[grpName] = nbArr = new Array(); for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up; nbArr[nbArr.length] = img; } }}//--></script><body bgcolor="#0000CC" link="#990066" vlink="#0066FF" onLoad="MM_preloadImages('Pictures/hometestdown.png','Pictures/hometestover.png','Pictures/engagementtestdown.png','Pictures/engagementtestover.png','Pictures/weddingtestdown.png','Pictures/weddingtestover.png','Pictures/marriedguestsdown.png','Pictures/marriedguestsover.png','Pictures/golftournamentdown.png','Pictures/golftournamentover.png','Pictures/contactusdown.png','Pictures/contactusover.png')"><table border="0" cellpadding="0" cellspacing="0"> <tr> <td><a href="Home.htm" target="_top" onClick="MM_nbGroup('down','group1','Home','Pictures/hometestdown.png',1)" onMouseOver="MM_nbGroup('over','Home','Pictures/hometestover.png','',1)" onMouseOut="MM_nbGroup('out')"><img src="Pictures/hometestup.png" alt="Home" name="Home" width="115" height="25" vspace="5" border="5" onload=""></a></td> </tr> <tr> <td><a href="Home.htm" target="_top" onClick="MM_nbGroup('down','group1','Engagement','Pictures/engagementtestdown.png',1)" onMouseOver="MM_nbGroup('over','Engagement','Pictures/engagementtestover.png','',1)" onMouseOut="MM_nbGroup('out')"><img src="Pictures/engagementtestup.png" alt="Engagement" name="Engagement" vspace="5" border="5" onload=""></a></td> </tr> <tr> <td><a href="Home.htm" target="_top" onClick="MM_nbGroup('down','group1','Wedding','Pictures/weddingtestdown.png',1)" onMouseOver="MM_nbGroup('over','Wedding','Pictures/weddingtestover.png','',1)" onMouseOut="MM_nbGroup('out')"><img src="Pictures/weddingtestup.png" alt="Wedding" name="Wedding" vspace="5" border="5" onLoad=""></a></td> </tr> <tr> <td><a href="Home.htm" target="_top" onClick="MM_nbGroup('down','group1','MarriedGuests','Pictures/marriedguestsdown.png',1)" onMouseOver="MM_nbGroup('over','MarriedGuests','Pictures/marriedguestsover.png','',1)" onMouseOut="MM_nbGroup('out')"><img src="Pictures/marriedguestsup.png" alt="Married Guests" name="MarriedGuests" vspace="5" border="5" onLoad=""></a></td> </tr> <tr> <td><a href="Home.htm" target="_top" onClick="MM_nbGroup('down','group1','GolfTournament','Pictures/golftournamentdown.png',1)" onMouseOver="MM_nbGroup('over','GolfTournament','Pictures/golftournamentover.png','',1)" onMouseOut="MM_nbGroup('out')"><img src="Pictures/golftournamentup.png" alt="Golf Tournament" name="GolfTournament" vspace="5" border="5" onLoad=""></a></td> </tr> <tr> <td><a href="Home.htm" target="_top" onClick="MM_nbGroup('down','group1','ContactUs','Pictures/contactusdown.png',1)" onMouseOver="MM_nbGroup('over','ContactUs','Pictures/contactusover.png','',1)" onMouseOut="MM_nbGroup('out')"><img src="Pictures/contactusup.png" alt="Contact Us" name="ContactUs" vspace="5" border="5" onLoad=""></a></td> </tr></table>
  14. I will post it when I get home this evening. Thanks for the help. Do you recommend any books for learning web design? If this question is hijacking the thread, then let me know and I will erase it. You can PM me the answer, if you have one.
  15. How am I hijacking the post? Am I not talking about the same thing, just a different function? I apologize if I am hijacking the post.I can't post my code until I get home. My code is on my home computer. I vaguely understand the code in the example. It looks like a table was used for the naviagation bar. Other than that, I don't follow the java scripting part of the code.
×
×
  • Create New...