how can i make input TYPE="TEXT".. = the_name

M

Michael

Hello
how can i make the_name = <input TYPE="TEXT" NAME="firstname" size="20"
or i trying to have what is typed in the text box to = the_nam
I found how to do it from a prompt but i don't like prompts. J
thanks
Michae

<html><head><meta name="GENERATOR" content="Microsoft FrontPage 5.0"><meta name="ProgId" content="FrontPage.Editor.Document"><title>Cookie Example</title><script language="JavaScript"><!-- hide m

function setCookie(

var the_name =
var the_cookie = "wm_javascript=" + escape("username:" + the_name)
var the_date = new Date("December 31, 2050")
var the_cookie_date = the_date.toGMTString()
the_cookie = the_cookie + ";expires=" + the_cookie_date
document.cookie = the_cookie
alert("Thanks, now go to the next page.")


// show me--></script></head><body><h1>Cookie Example</h1><p><input TYPE="TEXT" NAME="?" size="20"></p><p>Click here to <a href="#" onClick="setCookie(); return false;">set a cookie</a><br
Then click here to see an example of <a href="read_cookie1.asp">the cookie being read</a></p></body></html>
 
N

Net55

http://javascript.internet.com/forms/passing-values.html
-----Original Message-----
Hello,
how can i make the_name = <input TYPE="TEXT" NAME="firstname" size="20">
or i trying to have what is typed in the text box to = the_name
I found how to do it from a prompt but i don't like prompts. JK
thanks,
Michael

<html><head><meta name="GENERATOR" content="Microsoft
FrontPage 5.0"><meta name="ProgId"
content="FrontPage.Editor.Document"> said:
function setCookie()
{
var the_name = ?
var the_cookie = "wm_javascript=" + escape ("username:" + the_name);
var the_date = new Date("December 31, 2050");
var the_cookie_date = the_date.toGMTString();
the_cookie = the_cookie + ";expires=" + the_cookie_date;
document.cookie = the_cookie;
alert("Thanks, now go to the next page.");
}

// show me--></script></head><body><h1>Cookie
Example</h1><p><input TYPE="TEXT" NAME="?"
size="20"> said:
Then click here to see an example of <a
href="read_cookie1.asp">the cookie being
 
M

Mr B

If you are just asking how to get data from a form valud via Javascript, it's just "document.<formname>.<fieldname>.value

So
the_name = document.FrontPage_Form1.firstname.valu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top