vacalo
10-30-2002, 01:08 PM
Hi guys and thanks in advance in any help provided.
I am a complete beginner in Javascript.
I was writing a page with a form using:
<FORM METHOD="POST" ACTION="mailto:x@x.com?subject=Something" ENCTYPE="text/plain" NAME="form1" onsubmit="myfunctions('no2');return myfunction(form1.text1.value,form1.text2.value)">
Question 1.
How can I put in the "subject" part of the form something coming from a variable and not a fixed text (as the one above = "Something").
I need to get the value from a textbox(for example: form1.text1.value") and pass it as the subject in the email generated from the form.
Question 2.
As you see on my code above after the "onsubmit" I call two functions. Is that the way to call them? It works on my pc but I was experimenting to find that. Is there another way or was I lucky to find that out?
Question 3.
At the bottom of my form as you all know you use:
<INPUT TYPE=submit VALUE="Send it!">
to send the form.
I tried to put a "onClick" on that button to call another function but it doesnt seem to work?
Why?
Question 4.
After I submit the page I want the whole IE page to get redirected to another URL.
How can I do that?
window.open opens a new one. I need for my one.
I know how to do it if in the ACTION part of my form put a URL but that way I wont be able to send an email.
Guys please please help this newbie.
Not too techy replies please
I am a complete beginner in Javascript.
I was writing a page with a form using:
<FORM METHOD="POST" ACTION="mailto:x@x.com?subject=Something" ENCTYPE="text/plain" NAME="form1" onsubmit="myfunctions('no2');return myfunction(form1.text1.value,form1.text2.value)">
Question 1.
How can I put in the "subject" part of the form something coming from a variable and not a fixed text (as the one above = "Something").
I need to get the value from a textbox(for example: form1.text1.value") and pass it as the subject in the email generated from the form.
Question 2.
As you see on my code above after the "onsubmit" I call two functions. Is that the way to call them? It works on my pc but I was experimenting to find that. Is there another way or was I lucky to find that out?
Question 3.
At the bottom of my form as you all know you use:
<INPUT TYPE=submit VALUE="Send it!">
to send the form.
I tried to put a "onClick" on that button to call another function but it doesnt seem to work?
Why?
Question 4.
After I submit the page I want the whole IE page to get redirected to another URL.
How can I do that?
window.open opens a new one. I need for my one.
I know how to do it if in the ACTION part of my form put a URL but that way I wont be able to send an email.
Guys please please help this newbie.
Not too techy replies please