473,405 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

drop down list onchange event

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
7 38611
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
2,476 2GB
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
r035198x
13,262 8TB
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
2,476 2GB
ohh sorry i forget it.
u can do using document.createElement.

kind regards.
dmjpro.
May 29 '07 #5
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
16,027 Expert Mod 8TB
Moved from Articles section. Please do not post questions in the Articles section.
May 29 '07 #7
acoder
16,027 Expert Mod 8TB
Threads merged.
May 29 '07 #8

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

Similar topics

3
by: Matthew Louden | last post by:
if the user select the EmployeeID in drop down list, and then click the submit button, and it will look up database and show the Employee Name in the text box, this is easy. But my case is:...
10
by: Ryan McGeary | last post by:
In a <select> drop-down, the onchange event isn't called when scrolling through the dropdown using the mouse-wheel and when crossing over a new <optgroup>. Using the example below, notice how...
2
by: Matt | last post by:
The following code won't work, because onchange event is not trigger when drop down size = 1. But if I make the size="2" or greater, then it will work. Is that true? please advise. thanks!! ...
4
by: Dan | last post by:
Can anyone offer suggestions on how to do this or if it is possible? I have a form that uses a drop down box and 2 text fields. What I am trying to do is have the value of each text box set by...
1
by: Dan | last post by:
This is one that has me stumped and I need an expert's input. Any ideas why the values from the second script-generated drop down list isn't recognized by the script to add time values to the...
5
by: ezelasky | last post by:
I am trying to get a client side javascript function to invoke when the selection changes in a drop down list box. I have tried : ddl_specs.Attributes = "javascript"; ddl_specs.Attributes =...
4
by: tjonsek | last post by:
I have two drop down boxes on a form. One feeds the second a list options based on user selection. With the second drop down, I want code that displays dynamic text in a <div> based on whatever the...
14
by: Doogie | last post by:
If I run this code below in ASP.NET 2.0 it fails with an "Object Required" error and I have no idea why. Could someone tell me why this is failing? Then if I can get an answer to that, I would...
7
controlbox
by: controlbox | last post by:
I have recently inplemented some drop-down lists (combos) on a page where one is dynamically populated according to the selection of another using the microsoft ajax extensions. I had to set...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.