Solved

dropdown & radio buttons..

Posted on 2003-11-27
3
327 Views
Last Modified: 2010-04-09
This is in continuation to the question referenced in
http://www.experts-exchange.com/Web/Web_Languages/HTML/Q_20808827.html#9823613

The problem is when I click the radio button, the corresponding drop-downs get activated for selection, and after selecting values from those drop-downs, a OK button is clicked which leads to a report in a different page.
However, when i press Back (provided by iexplorer), it comes back to the main page, and the view shows the radio button being checked, but the drop downs inactive (ideally it should be active when the radio button is checked).
Can I have a solution for this?
0
Comment
Question by:sdebayan
3 Comments
 
LVL 7

Accepted Solution

by:
gam3r_3xtr3m3 earned 30 total points
ID: 9830905
i posted that before... lol... that's the third one i posted.
<html>
<head>
<title>2 radio buttons and a option box!</title>
<script language="JavaScript" type="text/javascript">
var cont1=null;
function loadStat(){
if(document.theform.radio1.selected==true){enableSelect();}}
function checkStat(){
if(cont1=="y"){
alert("Select a database!");return false;}}
function enableSelect(){
cont1="y";
if(document.theform.selectbox.disabled==true){
document.theform.selectbox.disabled=false;}
if(document.theform.sbmtbtn.disabled==true){
document.theform.sbmtbtn.disabled=false;}}
function disableSelect(){
cont1="n";
if(document.theform.selectbox.disabled==false){
document.theform.selectbox.disabled=true;}
if(document.theform.sbmtbtn.disabled==true){
document.theform.sbmtbtn.disabled=false;}}
</script>
</head>
<body onLoad="loadStat();">
<div align="center">
<form name="theform" onSubmit="return checkStat();">
<input type="radio" onClick="enableSelect();" name="radio1" value="y" />Add to Database<br />
<input type="radio" onClick="disableSelect();" name="radio1" value="n" />Don't do anything<br />
<select name="selectbox" disabled="disabled">
<option>Please select one...</option>
<option value="db1">database 1</option>
<option value="db2">database 2</option>
<option value="db3">database 3</option>
</select>
<br /><input type="submit" name="sbmtbtn" value="Submit" disabled="disabled" />
</div>
</body>
</html>
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Do you want to insert HTML5 video into your site? This is the tutorial how to do so. What are the main advantages of HTML5 video? 1) Have good compression, good image quality, and low decode processor use. 2) It is royalty-free 3) It is easi…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now