I'm using this javascript
:
- var curr_type="adherence";
-
function update(){
-
var r=document.getElementById("range").options;
-
var range=r[r.selectedIndex].value;
-
if(range!="L7D"){
-
document.getElementById("compliance").disabled=false;
-
}else{
-
document.getElementById("compliance").disabled=true;
-
document.getElementById("adherence").checked=true;
-
change("adherence");
-
}
-
var csat=document.getElementById("csat");
-
var stat=document.getElementById("stat");
-
csat.src="process.php?range="+range+"&type=csat";
-
var strURL="process.php?range="+range+"&type="+curr_type;
-
stat.src=strURL;
-
}
-
function change(type){
-
var r=document.getElementById("range").options;
-
var range=r[r.selectedIndex].value;
-
var stat=document.getElementById("stat");
-
var strURL="process.php?range="+range+"&type="+type;
-
stat.src=strURL;
-
curr_type=type;
-
}
with this HTML:
[HTML]<body>
<select id="range" onchange="update();">
<option value="L7D" selected>Last Week
<option value="L14">Last 2 Weeks
<option value="L1M">Last Month
<option value="MTD">Month to Date
</select>
<input onclick="change(this.value);" type="radio" name="stat" value="adherence" id="adherence" checked> Adherence
<input onclick="change(this.value);" type="radio" name="stat" value="compliance" id="compliance" disabled> Compliance
<br>
<img id="csat" src="process.php?range=L7D&type=csat" width=500 height=190>
<img id="stat" src="process.php?range=L7D&type=adherence" width=500 height=190>
</body>[/HTML]
The image source is a bit unorthodox, but is necessary (process.php takes the get variables, pulls data from a database, and generates a png image using the data). The code works fine in FireFox, but fails in IE and Opera. The problem is that the second image is not updating when update() or change() is called. The first image, however, doesn't have this issue. I am not recieving an error message from IE or Opera (other than it not working). I'm at a loss as to why I'm not recieving an error AND not getting the image updated. I could easily deal with either situation by itself, but this one has me stumped.
Live example
I'm sure it's something simple I've overlooked. Any help would be greatly appreciated.
~Billy~