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

button, text field and mail


  • Please log in to reply

#1
niceGirl

niceGirl

    New Member

  • Member
  • Pip
  • 1 posts
Hi to all, I was wondering if someon can help with a javascript code that I need, this is what I have to do:

make a form that let you put a text field and a button that said submit, when you click the submit button it most appear, in any part of the page a "Hello hippo" text. Also the button most extract what you type in the text field and when you click submit(the button) it most send the word or words you type in the textfield to outlook and appear as the one you send the mail. For example if you put nice in the field when outlook appear it most have that you will send a mail to nice.

I already have a part that it is this:



<center>
<font color="red"><h1> HIPPO'S HOMEWORK</h1></font>


<form name="0.1_myForm" target="_blank" onsubmit="return confirm('You are submitting information to an external page.\nAre you sure?');">

<font color="white"><i>Text</i><input type="text" name="0.1_text"> <br>

<input type="button" value="submit">
</font></form>
</center>


but I don't know how to do the mail part, so if anyone can help it will be great. thanx
  • 0

Advertisements


#2
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 876 posts
Here's some code you might try. The form name has been changed to "myForm" instead of "0.1_myForm". Can you see why "0.1_myForm" won't work?

function sendMail() {
subj = "subject goes here";
// the next line must be written as one continuous line
window.location = "mailto:"+document.myForm.text.value+"?subject="+subj;
}
  • 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