...

View Full Version : Script Modify Question



stevan
06-05-2005, 02:50 AM
I wanted to use this script BUT I need to add under body. I have tried but something always errors. COuld someone please add just one more field called passenger so I can see how it was done . I am tring to send the body of a web page invoice this seems to fill the bill unless there is something better

Thxs Steve


<script>
function doIt()
{
var S=document.exf2.subject.value;
var B=document.exf2.body.value;
self.location="mailto:someone@somewhere.com?subject="+S+"&body="+B;
}
</script>


</head>
<body>
<form name=exf2>
SUBJECT:<input type=text name=subject value="the subject"><BR>
BODY:<input type=text name=body value="the body"><BR>
<input type=button value="SUBMIT" onclick="doIt()">
</form>
</body>
</html>

martin_narg
06-05-2005, 05:12 AM
<script>
function doIt()
{
var S=document.exf2.subject.value;
var B=document.exf2.body.value;
var P=document.exf2.passenger.value;
self.location="mailto:someone@somewhere.com?subject="+S+"&body="+B+"\n\nPassenger:"+P;
}
</script>


</head>
<body>
<form name=exf2>
SUBJECT:<input type=text name=subject value="the subject"><BR>
PASSENGER:<input type="text" name="passenger"><br>
BODY:<input type=text name=body value="the body"><BR>
<input type=button value="SUBMIT" onclick="doIt()">
</form>
</body>
</html>


Is this what you are looking for mate? Hope this helps.

m_n

nikkiH
06-08-2005, 02:52 AM
There are so many problems with using mailto for form submission, I can't list them here.

Use a server-side form mail solution.

See here (http://www.ipwebdesign.net/kaelisSpace/useful_mailto.html) for more, including a list of free services. Google will show even more, I'm sure.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum