Click to See Complete Forum and Search --> : Mail Form in DreamWeaver
CallFaheem2
12-03-2006, 04:03 AM
How to design a mail form in Dreamaver.
My concept is
A subject column
Body
2 buttons
Mail to and clear.
clear button will clear the text from subject and body
and mail button will send the text in subject and body to my email (name@myname.com).
This is What I want to achieve. I have made an attempt and now I am stuck on 2 parts.
Here is one line of code
(((( <input type="submit" id="powerenergize@hotmail.com" name="send" Value="Send" /> ))))
is this correct ? secondly the send button should send me mail to the address next to id value.
Now I have uploaded it to hosting site and seems to work fine, when I send the text it forwards it to next page of hosting site saying a page is missing.
please guide me here.
Compguy Pete
12-04-2006, 12:07 AM
mostly when people do something like this it goes into to form tag.
<form name="form1" method="post" action="mailto:powerenergize@hotmail.com">
The subject line can be played with some but try that... also check with your hosting support and ask them what they have for form submit scripts already installed. chances are they have something for you use that will give you a lot more control over how your form will work.
CallFaheem2
12-04-2006, 05:20 AM
Thanks Pete for the help.
Now I did some changes but still its giving me an page missing error.
Is it okie i send you whole codes........
thanks once again
Could be that it is redirecting the form to a confirmation page. You might look at your code to see if that's true.
KDLA
Compguy Pete
12-04-2006, 10:21 AM
You can do a "quote" and post your code inside of that...
I think it would be good to see your code... or a link to that page.
CallFaheem2
12-05-2006, 03:33 AM
Here are the codes. I am making this site in DW.
((( <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Energy Solutions Contacts</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center"></div>
<div id="TopHEADER" style="position:absolute; width:657px; height:91px; z-index:1; left: 203px; top: 14px">
<table width="75%" border="0">
<tr>
<td><img src="images/Logo1.gif" width="146" height="86"><img src="images/header1.gif" width="634" height="86"></td>
</tr>
</table>
</div>
<div id="Body" style="position:absolute; width:787px; height:622px; z-index:2; left: 203px; top: 108px">
<table width="100%" border="0">
<tr>
<td><img src="images/img_03.jpg" width="780" height="16"></td>
</tr>
</table>
<font size="-7" color="#FFFFFF">a</font><img src="images/contactH.jpg" width="201" height="20">
<div id="mialimage" style="position:absolute; width:200px; height:199px; z-index:2; left: 4px; top: 236px"><br>
This form is still under construction </div>
<div id="Body1" style="position:absolute; width:566px; height:516px; z-index:3; left: 210px; top: 23px">
<p><form id="formContactMe" name="contactme" action="msgsent.html" method="post" style="width:410px;">
<p align="center"> Name
<input type="text" id="inputName" name="name" maxlength="70" style="width:150px;" />
</p>
<p align="center"> Subject
<input type="text" id="inputSubject" name="subject" maxlength="255" style="width:150px;" />
</p>
<p align="center"> Your Message:<br />
<textarea id="textareaMessage" name="message" style="width:400px; height:300px;"></textarea>
</p>
<p style="text-align:center;" align="center">
<input type="submit" id="inputsubmit" name="send" Value="Send" />
<input type="reset" id="inputReset" name="reset" Value="Clear" />
</p>
</form>
</div>
<div id="Discliamer" style="position:absolute; width:785px; height:39px; z-index:7; left: 1px; top: 558px">
<div align="center"><a href="index.html"><font size="2">Home</font></a> |
<a href="About%20Us.html"><font size="2">About Us</font></a> | <a href="Solution.html"><font size="2">Solutions</font></a>
| <a href="Contact.html"><font size="2">Contact</font></a> | <a href="Support.html"><font size="2">Support</font></a>
| <a href="FAQs.html"><font size="2">FAQs</font></a><br>
<font size="1">© All Rights Reserved</font></div>
</div>
</div>
</body>
<body>
<script language="php">
$email = $HTTP_POST_VARS[email];
$mailto = "powerenergize@hotmail.com";
$mailsubj = "Form submission";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
</script>
</body>
</html>))))
Now there Bold tag on msgsent.html is to make it bold that thats the page I want it to proceed when the action is successful.
Script tag I was looking through some books and I felt that this was missing...