473,513 Members | 2,545 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

drop down list onchange event

7 New Member
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 38619
slekshmipriya
7 New Member
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 Top Contributor
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 MVP
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 Top Contributor
ohh sorry i forget it.
u can do using document.createElement.

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

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

Similar topics

3
4845
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: when the user select the employeeid in drop down list, it will fire the onchange event, and then look up database and show the employee name in the...
10
7623
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 the onchange event isn't called when mouse wheel scrolling between A3 and B1, but it works properly when scrolling between A1 and A2. E.g....
2
4212
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!! <script type="text/javascript"> function showRange() { alert("showRange"); } </script> <SELECT NAME="range" SIZE="1" onchange="showRange();">
4
6286
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 the choice from the drop down box. Something like: <form name="populatefrm" id="contactfrm" method="post"
1
2886
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 text boxes? What this script is suppose to do is change the value of a second drop down list based on the selection from the first. Then a value...
5
3648
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 = "return OnChangeSpec();"; with & without the "return"; and with & without AutoPostBack = true on the list box property and the javascript function...
4
9808
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 user selects. So far, it doesn't seem to be firing. I am only testing the functionality because I have quite a bit of text to display depending...
14
1982
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 actually prefer to run a C# method instead of a javascript one and would like to figure out how to set that up (but I get the same error doing that...
7
22394
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 AutoPostBack = true, and enable viewstate in order for the serverside events to fire, but once this was done, all seemed well - so far so good... Also,...
0
7397
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7565
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7128
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7543
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5704
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5103
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3242
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
817
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
473
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.