I have a webpage which to used work just fine in IE6, but since IE7 came out, many of my site users started complaining that some button are not functioning at all.
The webpage shows and plays audio clip for students, and then the student can record his/her voice.
The play/Pause/stop buttons for playing the audio file works just fine.
but the buttons for recording area (stop/pause/replay), and after you click record button will not respond at all, except for one case, if the student right-click on the button and choose open link.
This is happening only in IE7.
[COLOR=”Red”][B]This is the code for the first audio file
//Open the audio
function openit(fn, sam_au, userID){
document.getElementById(‘speedocx’).SetValue(100);
if (sam_au.toLowerCase().indexOf(“.wav”,0)>0) {
AudioSample=sam_au;
}
else{
AudioSample=””; }
if (fn.toLowerCase().indexOf(“.wav”,0)<=0){
alert(“Error: Audio file cannot be found. Please try refreshing the page. If the problem persists contact [email][email protected]
return;
}
document.getElementById(‘amocx’).remotefile = fn;
document.getElementById(‘amocx’).getfile();
studentfilename = userID + fn;
}
//Play the teacher audio
function playit(){
if (document.getElementById(‘amocx’).filename == “” || document.getElementById(‘amocx’).filename==null) {
alert(“The audio file was not initialized properly. Please try to refresh. If the problem persists, please contact [email][email protected]
}
else {
document.getElementById(‘amocx’).fileload(document.getElementById(‘amocx’).filename);
document.getElementById(‘amocx’).SetPlayRange();
document.getElementById(‘amocx’).setspeed(document.getElementById(‘speedocx’).value/100);
document.getElementById(‘amocx’).playit();
}
}
//Pause the teacher audio
function pauseit(){
document.getElementById(‘amocx’).pause();
document.getElementById(‘amocx1’).pause();
}
//Stop the teacher audio
function stopit(){
document.getElementById(‘amocx’).stopit();
document.getElementById(‘amocx1’).stopit();
}
[COLOR=”Red”][B]This is the code for the Recording
//Record the student audio
var is_re;
function recordit(){
document.getElementById(‘rmocx’).dostop()
is_re=1;
document.getElementById(‘rmocx’).style.height=138;
document.getElementById(‘amocx1’).style.height=0;
document.getElementById(‘amocx1’).stopit();
if (document.getElementById(‘rmocx’).DevHandle == 0){ document.getElementById(‘rmocx’).beginit(); }
document.getElementById(‘rmocx’).dostart();
}
//Play the student audio
function playit1(){
document.getElementById(‘rmocx’).dostop()
document.getElementById(‘amocx1’).stopit()
if (document.getElementById(‘amocx1’).filename==””||document.getElementById(‘amocx1’).filename==null){
alert(“Please record first!”);
}
else{
document.getElementById(‘amocx1’).fileload(document.getElementById(‘rmocx’).sfile);
document.getElementById(‘amocx1’).SetPlayRange();
document.getElementById(‘amocx1’).playit();
}
}
//Stop the recording for the student audio
function stoprecord(){
if (is_re==0){document.getElementById(‘amocx1’).stopit();}
else {
is_re=0;
document.getElementById(‘rmocx’).dostop();
document.getElementById(‘rmocx’).style.height=0;
document.getElementById(‘amocx1’).style.height=138;
document.getElementById(‘amocx1’).filename=document.getElementById(‘rmocx’).sfile;
document.getElementById(‘amocx1’).openit();
}
}
//Pause the student recording
function pauserecord(){
if (is_re==0){document.getElementById(‘amocx1’).pause();}
else{ document.getElementById(‘rmocx’).dopause(); }
}