• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 343
  • Last Modified:

dropdown & radio buttons..

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
sdebayan
Asked:
sdebayan
1 Solution
 
gam3r_3xtr3m3Commented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now