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

drop down list onchange event

P: 7
Hai friends.I have a pblm with my drop down list onchange event.The pblm is as follow

I have a drop drown list with items 1,2 ,3 etc.
On selecting an item from the drop down list i want to populate that much text boxes for entering values.for example if i select 3 , three text boxes are to be created.if 1, one text box like that. So with out reloading this page can i achieve my need?Most of the time the funtion for reloading the page is called on the Onchange event of the drop down list. But i don't want to reload the page.Am using PHP coding.so please help me as soon as possible.looking forward for a reply.
May 29 '07 #1
Share this Question
Share on Google+
7 Replies


P: 7
Hai friends.I have a pblm with my drop down list onchange event.The pblm is as follow

I have a drop drown list with items 1,2 ,3 etc.
On selecting an item from the drop down list i want to populate that much text boxes for entering values.for example if i select 3 , three text boxes are to be created.if 1, one text box like that. So with out reloading this page can i achieve my need?Most of the time the funtion for reloading the page is called on the Onchange event of the drop down list. But i don't want to reload the page.Am using PHP coding.so please help me as soon as possible.looking forward for a reply.
May 29 '07 #2

dmjpro
100+
P: 2,476
okk...

put all the fields (Text Boxes or any other controls) hidden.
and populate all the fileds as visible whenever u want.
i think u understand my point.
best of luck.

kind regards.
dmjpro.
May 29 '07 #3

10K+
P: 13,264
Hai friends.I have a pblm with my drop down list onchange event.The pblm is as follow

I have a drop drown list with items 1,2 ,3 etc.
On selecting an item from the drop down list i want to populate that much text boxes for entering values.for example if i select 3 , three text boxes are to be created.if 1, one text box like that. So with out reloading this page can i achieve my need?Most of the time the funtion for reloading the page is called on the Onchange event of the drop down list. But i don't want to reload the page.Am using PHP coding.so please help me as soon as possible.looking forward for a reply.
You can do this using Javascript only. Have a look at document.createElement
May 29 '07 #4

dmjpro
100+
P: 2,476
ohh sorry i forget it.
u can do using document.createElement.

kind regards.
dmjpro.
May 29 '07 #5

P: 7
ohh sorry i forget it.
u can do using document.createElement.

kind regards.
dmjpro.

Can u explain it in detail?
here is my code
<html>
<head>
<script language="javascript">
function createTxtbox()
{
--------------
-----------
}
</script>
</head>
<body>
<form name="my form">

<select name="qual_no" id="qual_no" onChange="return createTxtbox()">
<option value="s" selected>Select</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select></td>
</form>
</body>
</html>

This is the code and the function createTxtbox() is to be called on the onChange event.and i wanna pass the selected value also so that i can create that much textboxes.pls help me.
May 29 '07 #6

acoder
Expert Mod 15k+
P: 16,027
Moved from Articles section. Please do not post questions in the Articles section.
May 29 '07 #7

acoder
Expert Mod 15k+
P: 16,027
Threads merged.
May 29 '07 #8

Post your reply

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