2 Replies - 4475 Views - Last Post: 08 April 2009 - 01:55 AM

#1 sanni  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 16-December 08

How to make send button work?(form post method)

Post icon  Posted 08 April 2009 - 01:45 AM

i have designed a simple from...in htnl...

what i need is if user fills all info and click send , the details the user enter should to send to my email.....
i tried to use from post but it is not working


pls help me guys

i also used javascript to check the user wheather he fill all the details
........ i need to make work the send button.....pls help me............

my code is below

<input name="name" type="text"
		 onchange="java script:while(''+this.value.charAt(0)==' ')
				   this.value=this.value.substring(1,this.value.length);" /><br>
  <br />
  
<br />
 Your Email:<br />
  <input name="email" type="text"
		 onchange="java script:while(''+this.value.charAt(0)==' ')
				   this.value=this.value.substring(1,this.value.length);" />
  <br /><br>

<P><br>
	Any Queries ?<br>
<textarea name="text" rows=5 cols=60></textarea>

  
  <br /><br />
<form method="post" 
   action="mailto:santhoshlfms@gmail.com" 
	 enctype="text/plain">

  <input name="submitbutton" type="submit" value="Click To Submit Details" />
	<input type="reset" value="Reset"><p>
</form></p>



** Edit ** :code:

Is This A Good Question/Topic? 0
  • +

Replies To: How to make send button work?(form post method)

#2 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5388
  • View blog
  • Posts: 27,383
  • Joined: 10-May 07

Re: How to make send button work?(form post method)

Posted 08 April 2009 - 01:47 AM

Which method is giving you trouble?

Verifying the input?
-or-
Sending the email?
Was This Post Helpful? 0
  • +
  • -

#3 sanni  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 16-December 08

Re: How to make send button work?(form post method)

Posted 08 April 2009 - 01:55 AM

both sending and checking the mail.....

checking works sometime but its not useful............

and it dosent send anything to the mail address i provided.......


thanks for your reply....


i have pasted the full code below

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>sanni</title>
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<script language="Javascript" type="text/Javascript">
function check()
{
var details_accepted = true;
var check_strudel = false;

if (document.form1.name.value == "" ||
document.form1.email.value == "")
{
details_accepted = false;
alert("You have not Completed the form");
}


if (document.form1.email.value.indexOf("@") != -1 &&
document.form1.email.value.indexOf(".") != -1 )
{
check_strudel = true;
}

if (check_strudel == false)
{
alert("You have not supplied a valid e-mail address");
details_accepted = false;
}

if (details_accepted == true)
{
alert("Thank you!.");
return true;
}
else
{
return false;
}
}

function check_number()
{
var last_number = document.form1.age.value.length-1;
last_key = document.form1.age.value.substr(last_number, 1)
var check_digit = false;
if ("0123456789".indexOf(last_key) != -1)
{
check_digit=true;
}

if (check_digit == false)
{
document.form1.age.value="";
}
}
</script>
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Cooling Control Systems Ltd</a></h1>
<br>
</div>
<!-- end #logo -->
<div id="menu">
<ul>

<li class="active"><a href="S:\website files\incorporated\index.html">Home</a></li>
<li><a href="S:\website files\incorporated\about.html">About Us</a></li>
<li><a href="S:\website files\incorporated\pro1.html">Products</a></li>
<li><a href="S:\website files\incorporated\servi.html">Services</a></li>
<li><a href="S:\website files\incorporated\from.html">Contact Us</a></li>
</ul>
</div>
<!-- end #menu -->
</div>
<!-- end #header -->
<div id="page">
<div id="content">
<div class="post">
<h1 class="title">Contact us</h1>
<p class="byline</p>
<div class="entry">
<p<form name="form1" onsubmit="return check()">
Your Name:<br />
<input name="name" type="text"
onchange="java script:while(''+this.value.charAt(0)==' ')
this.value=this.value.substring(1,this.value.length);" /><br>
<br />

<br />
Your Email:<br />
<input name="email" type="text"
onchange="java script:while(''+this.value.charAt(0)==' ')
this.value=this.value.substring(1,this.value.length);" />
<br /><br>

<P><br>
Any Queries ?<br>
<textarea name="text" rows=5 cols=60></textarea>


<br /><br />
<form method="post"
action="mailto:santhoshlfms@gmail.com"
enctype="text/plain">

<input name="submitbutton" type="submit" value="Click To Submit Details" />
<input type="reset" value="Reset"><p>
</form></p>
</div>
<div class="meta">

</div>
</div>
<div class="post">



<div id="sidebar">
<div id="sidebar-bgtop"></div>
<div id="sidebar-content">
<ul>
<li id="search">
<h2>Search</h2>
<form name="jksearch" action="http://www.google.com/search" method="get" onsubmit="jksitesearch(this)">

<p>Search <br />
<input id="hiddenquery" type="hidden" name="q" />
<input name="qfront" type="text" style="width: 200px" value="type here" /> <input type="submit" value="Search" /><br />
<div style="font: bold 11px Verdana;">Google:<input name="se" type="radio" checked> Yahoo:<input name="se" type="radio"> MSN:<input name="se" type="radio">
</div>

<script type="text/javascript">


//Enter domain of site to search.
var domainroot="www.google.com"

var searchaction=[ //form action for the 3 search engines
"http://www.google.com/search",
"http://search.yahoo.com/search",
"http://search.msn.com/results.aspx"
]

var queryfieldname=["q","p","q"] //name of hidden query form for the 3 search engines

function switchaction(cur, index){
cur.form.action=searchaction[index]
document.getElementById("hiddenquery").name=queryfieldname[index]
}

function jksitesearch(curobj){
for (i=0; i< document.jksearch.se.length; i++){ //loop through radio to see which is checked
if (document.jksearch.se[i].checked==true)
switchaction(document.jksearch.se[i], i)
}
document.getElementById("hiddenquery").value="site:"+domainroot+" "+curobj.qfront.value
}


</script>

</p>

</form>

</li>
<li>
<h2>Categories</h2>
<ul>
<li><a href="#">Fusce dui neque fringilla</a></li>
<li><a href="#">Eget tempor eget nonummy</a></li>
<li><a href="#">Magna lacus bibendum mauris</a></li>
<li><a href="#">Nec metus sed donec</a></li>
<li><a href="#">Magna lacus bibendum mauris</a></li>
<li><a href="#">Velit semper nisi molestie</a></li>
<li><a href="#">Eget tempor eget nonummy</a></li>
</ul>
</li>
<li>
<h2>links</h2>
<ul>
<li><a href="#">Nec metus sed donec</a></li>
<li><a href="#">Magna lacus bibendum mauris</a></li>
<li><a href="#">Velit semper nisi molestie</a></li>
<li><a href="#">Eget tempor eget nonummy</a></li>
<li><a href="#">Nec metus sed donec</a></li>
<li><a href="#">Magna lacus bibendum mauris</a></li>
<li><a href="#">Velit semper nisi molestie</a></li>
</ul>
</li>
</ul>
</div>
<div id="sidebar-bgbtm"></div>
</div>
<!-- end #sidebar -->
</div>
<!-- end #page -->
<div id="footer">
<p>&copy; sanni Ltd </p>
</div>
<!-- end #footer -->
</body>
</html>
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1