Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

html question


  • Please log in to reply

#1
MR0624

MR0624

    Member

  • Member
  • PipPipPip
  • 367 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
  • 876 posts
add action="mailto:[email protected]" inside the form tag, as below

<form name="form1" action="mailto:[email protected]" ... />
  • 0

#3
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 876 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
  • 367 posts
just got it you guys. Thanks a lot.....


<<MR0624
  • 0

#5
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 876 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