how to declare a textbox in Javascript???
declaring text box
Collapse
X
-
i don't understand this ... are the textboxes just hidden or do you need to create them dynamically first? ... the function should just receive the name of the box - what should exactly happen then? please show what you have done so far and give an example for the wished behaviour ...
kind regardsComment
-
the text boxes will be hidden at the page load. in the fuction i have wriiten the code to make it visible. please see the below mail
so instead of writing the text boxes id one by one. can i pass the text box id as parameter?Code:function displayCalibTxt() { document.Form1.TxtCalib1.style.display='block' document.Form1.TxtCalib2.style.display='block' }Comment
-
Yes, of course.Originally posted by Aseefso instead of writing the text boxes id one by one. can i pass the text box id as parameter?
Remember to make sure the ID is unique.Code:function displayTxtBox(id) { document.getElementById(id).style.display='block'; }Comment
-
Am sorry to bother u guys. i tried to make the function as above. an d i called the function like
<TD onclick="displa yText(TxtID)">< INPUT id="TxtID" style="WIDTH: 39px; HEIGHT: 22px" type="text" size="1" name="Txt1></TD>
but i am getting error. can you pls help me.Comment
Comment