posted 17 years ago
Hi Ranjan,
As you can see from the idea posted by Eric,
It is necessary that your html already contains the text box with initial
style set to none
<input type="text" name="B" id="B" style="display:none">
once the other value is selected from select list we execute the javascript function which changes the style of the text box from none to may be "inline" so that the textbox is visible
to change the style of the textbox,first fetch the id of the text box
and change the display property of style as follows:
document.getElementById("B").style.display="inline"; //execute this only if the other value from select list is selected
Method 2:
This method does not require that a textbox is already created
You create the textbox on the fly
if (other value from select list is selected)
execute the following code in the javascript function
{
var txt=document.createElement("<INPUT TYPE='text'NAME='textfield'>");
document.body.insertBefore(txt);
}
This is on the fly creation of textbox
Hope that helps
Ketan