473,320 Members | 1,936 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,320 software developers and data experts.

Only allow selection from select list when radio button clicked

254 100+
Hi

I have a html in which there is two selection box and two radio button. Radio buttion is of array type.

What I want if user will click the radio button then only he/she be able to make selection from select list. Initially I tried to disble the selection control. And when user will click the radio then only it was enabled. but I faced problem that value is not passed to the next form of the select list. so I enable the select list now it is working. but I want selection made only possible when user clicks the radio button.
Jan 25 '08 #1
10 3371
acoder
16,027 Expert Mod 8TB
Please remember to provide a meaningful Title for any threads started (see the FAQ entry Use a Good Thread Title).

This helps to ensure that other members, and also the general public, will have a better chance of finding answers to any similar questions.

Moderator.
Jan 25 '08 #2
acoder
16,027 Expert Mod 8TB
I have a html in which there is two selection box and two radio button. Radio buttion is of array type.

What I want if user will click the radio button then only he/she be able to make selection from select list. Initially I tried to disble the selection control. And when user will click the radio then only it was enabled. but I faced problem that value is not passed to the next form of the select list. so I enable the select list now it is working. but I want selection made only possible when user clicks the radio button.
Instead of disabling the select element, set it to readonly.
Jan 25 '08 #3
mukeshrasm
254 100+
Instead of disabling the select element, set it to readonly.
Sorry for that!
I have given the html format of the page. I want selection made only possible if user selects first any of the radio buttion then he may able to select the from any select. Means If he clicks radio value having Static then User will select page from Static1 select if he checks radio with value Dynamic then he will select from Dynamic Select.

Expand|Select|Wrap|Line Numbers
  1.  html
  2. <input type="radio" value="Static" name="Static"  />
  3. <select name="Static1" id="select">
  4.         <option>Select Static Page </option>
  5.         <option>page 1</option>
  6. <option>page 2 </option>
  7.  
  8.             </select>
  9. <input type="radio" value="Static" name="Static"  />
  10. <select name="Dynamic" id="select" ">
  11.         <option>Select Static Page </option>
  12.         <option>page 1</option>
  13. <option>page 2 </option>
  14.  
  15.             </select>
Jan 25 '08 #4
acoder
16,027 Expert Mod 8TB
Instead of disabling the select element, set it to readonly.
Ignore this. I don't think the select element has a readOnly property.

What you can do is onsubmit re-enable the select elements.
Jan 25 '08 #5
mukeshrasm
254 100+
Ignore this. I don't think the select element has a readOnly property.

What you can do is onsubmit re-enable the select elements.
I tried to reenble the select onsubmit but its value is not going next in php.
Jan 28 '08 #6
acoder
16,027 Expert Mod 8TB
I tried to reenble the select onsubmit but its value is not going next in php.
Can you show the code that you tried.
Jan 28 '08 #7
mukeshrasm
254 100+
Can you show the code that you tried.
The problem is solved now.
Jan 29 '08 #8
acoder
16,027 Expert Mod 8TB
The problem is solved now.
Glad you managed to solve it. For the benefit of anyone else who comes across this thread, can you tell us what the problem/solution was.
Jan 29 '08 #9
mukeshrasm
254 100+
Glad you managed to solve it. For the benefit of anyone else who comes across this thread, can you tell us what the problem/solution was.
Actually option's value was empty. then I assign some value to it.
Expand|Select|Wrap|Line Numbers
  1.  
  2. <select>
  3. <option value="Page1">Page1</option>
  4. </select>
Jan 30 '08 #10
acoder
16,027 Expert Mod 8TB
Actually option's value was empty. then I assign some value to it.
Thanks. Hopefully, it'll help someone with a similar problem.
Jan 30 '08 #11

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

Similar topics

2
by: /.. | last post by:
Hi all, I'm working on a report display page that currently uses 5 checkboxlists with a total of 86 items to display values from 5 different tables in an Access database. The page works fine...
8
by: Galina | last post by:
Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date. When faculty is selected, lists of lecturers and...
3
by: David Hearn | last post by:
I have a datalist that I have inserted a radio button into. The datalist populates with a list of items and each one has a radio button next to it. I need to use the radio button to allow the user...
0
by: Jennifer | last post by:
I had this beautiful datagrid on an ASP page (VB.Net as the code behind). When I clicked on a Select Button, the row was selected and the background color changed the way it was supposed to. The...
2
by: slitchfield | last post by:
Sorry if this is real beginner's stuff, but I'm an old-school HTML guy and this is all another world to me. Is there an easy way to get the user to specify a number from 1 to 5 (in a pick list...
1
by: Joe Attardi | last post by:
Hi all, On a form on one of my pages I have two <select> elements, and each one is paired up with a radio button. The idea is to choose an item from one list or the other and select the radio...
10
by: Carlos | last post by:
Hi all, I have a form with an input radio control in a template field. When the user selects an option, and press a button the selection disappears.. I would like the selection to persist after...
10
by: Bishman | last post by:
Hi, I need to programmatically allow or disallow the selection of multiple checkboxes on a form . At certain times I only want to allow a single selection, at other times I may wish to allow...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.