Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

html question


  • Please log in to reply

#1
MR0624

MR0624

    Member

  • Member
  • PipPipPip
  • 365 posts
Hello, I was just editing my site and thought it would be nice to add in a newsletter. I got the text box in but have a question about the submit button. If I want the email address put into my inbox how do i combine a "mailto" tag and a submit button? Thanks....



<<MR0624
  • 0

Advertisements


#2
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 875 posts
add action="mailto:abc@aol.com" inside the form tag, as below

<form name="form1" action="mailto:abc@aol.com" ... />
  • 0

#3
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 875 posts
the previous post will work if the email address is hard coded.

will send javascript code for text box address, soon.
  • 0

#4
MR0624

MR0624

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 365 posts
just got it you guys. Thanks a lot.....


<<MR0624
  • 0

#5
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 875 posts
try this:

<html>
<head>
<script LANGUAGE="JavaScript">
function mailWindow() {
DispWin = window.open('','NewWin', 'toolbar=no,status=no,width=300,height=200');
tag1 = "<a href=\'";
addr = "mailto:" + document.form1.address.value;
tag2 = "\'>";
linkText = "send mail to " + document.form1.address.value;
link = tag1 + addr + tag2 + linkText;
DispWin.document.write( link );
}
</script>

</head>
</body>

<body>

<form name="form1">
<p><b>Address:</b> <input TYPE="TEXT" LENGTH="30" NAME="address">
</p>
<p><input TYPE="BUTTON" VALUE="Address Ready" onClick="mailWindow();"></p>
</form>
</html>
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP