By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,341 Members | 1,720 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,341 IT Pros & Developers. It's quick & easy.

return a variable as a value to a text box

P: 16
Hi friends,
I have declared a variable in the script section in head of the html. Now I want that a text within the body have the value of that variable... Is it possible at all..?
here is my code that i am using:

[HTML]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<TITLE> New Document </TITLE>
<script language="javascript" id="clientEventHandlersJS">
var CalleePhoneNum = "Sam";


<form name ="some1" METHOD="LINK" action="some.html">
<INPUT TYPE="submit" VALUE="Click and See">
<input type="text" name="inputName" value=CalleePhoneNum.value>

Oct 15 '07 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
You posted this in the Articles section. I've moved it over to the forums section where it belongs.

Please use code tags when posting code:
HTML code here..

With regards to your question, when do you want this variable value to appear in the text box? On page load or when triggered by another event, e.g. a button click?
Oct 15 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.