Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 04-26-2008, 05:32 PM Email Form/Html
Banned

Posts: 143
Name: Blake
Location: Cuyahoga falls,Ohio
Trades: -2
Ok ive been wanting to do this. And today out of the Blue i looked for it and i found something that i could work with it's a Email form Using Javascript. You see the thing is im to lazy to install php On my server. so i need something to get around Downloading Php on to my server. I found a email form With javascript. Were it says begin and end script do i put that in my <head> tags? Im Trying to Put this on my website where it say's Email List.http://www.blakeanthonydesign.com


Code:
 
<html>
<head><script LANGUAGE="JavaScript">
<!-- This script and many more are available online from -->
<!-- The JavaScript Source!! http://javascriptsource.com -->
<!-- Begin
function getCookie(name){
var cname = name + "="; 
var dc = document.cookie; 
if (dc.length > 0) { 
begin = dc.indexOf(cname); 
if (begin != -1) { 
begin += cname.length; 
end = dc.indexOf(";", begin);
if (end == -1) end = dc.length;
return unescape(dc.substring(begin, end));
} 
}
return null;
}
function setCookie(name, value, expires) {
document.cookie = name + "=" + escape(value) + 
((expires != null) ? "; expires=" + expires.toGMTString() : "")
+ "; path=/";
}
function setName() {
var expdate = new Date ();
expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000 * 365));
var prompt=i = document.Mail.name.value;
setCookie("name", i, expdate);
}
function getName() {
if(getCookie("name") != null) {
document.Mail.Name.value = getCookie("emailname");
}
}
function getInfo() {
var now= new Date();
document.Mail.Info.value = "Browser: " + navigator.userAgent;
document.Mail.Info.value += "Date:" + now;
}
function checkMultiple() {
if (getCookie("emailsent") == 'true') return true;
else return false;
}
function process() {
setCookie("emailsent", "true");
with (document.Mail) {
if (Subject.selectedIndex == 1) action = "mailto:antispammer@earthling.net?subject=TJS - Comment";
else if (Subject.selectedIndex == 2) action = "mailto:antispammer@earthling.net?subject=TJS - Question";
else if (Subject.selectedIndex == 3) action = "mailto:antispammer@earthling.net?subject=TJS - Suggestion";
else if (Subject.selectedIndex == 4) action = "mailto:antispammer@earthling.net?subject=TJS - Broken Link";
else action = "mailto:antispammer@earthling.net?subject=TJS - Other";
}
}
function formCheck() {
var passed = false;
with (document.Mail) {
if (Subject.selectedIndex == 0) { 
alert("Please pick a subject.");
Subject.focus();
}
else if (Name.value == "") {
alert("Please inlcude your name.");
Name.focus();
}
else if (checkMultiple()) {
if (confirm("You just sent an e-mail from this form, are you sure you want to send another?")) {
process();
passed = true;
}
}
else {
process();
passed = true;
}
}
return passed;
}
// End -->
</script>
<title>JavaFILE</title>
<base target="leftframe">
</head>
<body BGCOLOR="#ffffff" link="#CC0033" vlink="#333399" alink="#FF0000" <!--content start-->
<p align="center"><img src="http://www.javafile.com/images/banner.GIF"
alt="banner.GIF (2826 bytes)"></p>
 
<table WIDTH="96%" BORDER="0" CELLSPACING="5" CELLPADDING="5">
<tr>
<td WIDTH="100%">Without question, this is the best javascript email form I have ever
seen. It sets cookies, checks form completion of all fields, and even knows if someone has
already sent a message with the form...JavaFILE gives this one 4936.7 stars! :)<font
FACE="ARIEL,HELVETICA" SIZE="-1"><p align="center"></font>Author: <a
href="
blktallos is offline
Reply With Quote
View Public Profile Visit blktallos's homepage!
 
 
Register now for full access!
Old 05-02-2008, 04:39 AM Re: Email Form/Html
Average Talker

Posts: 15
Trades: 0
<html>
<head>
<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{alert(alerttxt);
return false;
}
else {return true}
}
} function validate_form(thisform)
{
with (thisform)
{
if (validate_required(email,"Email must be filled out!")==false)
{email.focus();return false;}
}
}
</script>
</head> <body>
<form action="submitpage.htm"
onsubmit="return validate_form(this)"
method="post">
Email: <input type="text" name="email" size="30">
<input type="submit" value="Submit">
</form>
</body> </html>
__________________

Please login or register to view this content. Registration is FREE


Free Templates
gazal is offline
Reply With Quote
View Public Profile
 
Old 05-02-2008, 11:37 PM Re: Email Form/Html
Super Talker

Posts: 138
Name: Shawn Lindsey
Location: Kentucky
Trades: 0
Well usually with all Email Form, it is done using a simple PHP script, you don't have to install a PHP program on your site, just a php handler, that will handle the POST action of your form that you are emailing. THere are many free email php scripts out there all you have to do is upload it to your server, specify in it where you watn the email to go, and then tell your HTML form to use that php script as its POST action.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

ShawnITSolution is offline
Reply With Quote
View Public Profile Visit ShawnITSolution's homepage!
 
Old 05-03-2008, 12:13 AM Re: Email Form/Html
Banned

Posts: 143
Name: Blake
Location: Cuyahoga falls,Ohio
Trades: -2
Thank you All for your Great replies
blktallos is offline
Reply With Quote
View Public Profile Visit blktallos's homepage!
 
Old 05-04-2008, 10:38 PM Re: Email Form/Html
Banned

Posts: 16
Trades: 0
very good.I often use asp code for web email .but it is need server support asp.
now javascript needn't again.it is helpful to me,too.
very thanks.
bbmm1980 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Email Form/Html
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30464 seconds with 12 queries