
hie frnds I have a dropdown menu in the 3 options(1,2,3) are there if i choose 1 then I should get 1 text box if i select 2 the 2 textboxes should come can any one help me in this problem Thanx in advance............

Here is an ajax example which is having a drodown menu consisting of options 1,2,3. When the user select any option from the dropdown box, the corresponding number of textboxes will get displayed on the browser.
<html>
<head>
<script language="javascript" type="text/javascript">
var xmlHttp
var xmlHttp
function showState(str){
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null){
alert ("Browser does not support HTTP Request")
return
}
if(str=="1"){
document.getElementById("text1").style.visibility="visible";
document.getElementById("text2").style.visibility="hidden";
document.getElementById("text3").style.visibility="hidden";
}
else if(str=="2"){
document.getElementById("text1").style.visibility="visible";
document.getElementById("text2").style.visibility="visible";
document.getElementById("text3").style.visibility="hidden";
}
else if(str=="3"){
document.getElementById("text1").style.visibility="visible";
document.getElementById("text2").style.visibility="visible";
document.getElementById("text3").style.visibility="visible";
}
}
function GetXmlHttpObject()
{
var xmlHttp=null;
try
{
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
</script>
</head>
<body>
<select name='country' onchange="showState(this.value)">
<option value="none">Select</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<br>
<div id='div'>
<input type='text' name='text1' id='text1' style="visibility:hidden;"><br>
<input type='text' name='text2' id='text2' style="visibility:hidden;"><br>
<input type='text' name='text3' id='text3' style="visibility:hidden;"><br>
</div>
</body>
</html>

THank u very much i have sucesfully executed it......

And one more thing how to insert to the database dynamically .......
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.