Is there a way to refresh the screen without refreshing the page using JavaScript?
I have a little piece of code that works perfectly in FireFox.
In IE, when I click the checkbox, nothing happens. But when I click a whitespace on the site, it changes like it is supposed to when I click the checkbox.
So I need a way to make IE "refresh the screen".
Is this possible?
/* sign-up swap outs */
if(document.getElementById){
function showLogin(){
v = document.getElementById('loginDIV');
v.style.display = 'block';
x = document.getElementById('registerDIV');
x.style.display = 'none';
z = document.getElementById('selectAction');
z.style.display = 'none';
a = document.getElementById('redo');
a.style.display = 'block';
return true;
}
function showRegister(){
v = document.getElementById('loginDIV');
v.style.display = 'none';
x = document.getElementById('registerDIV');
x.style.display = 'block';
z = document.getElementById('selectAction');
z.style.display = 'none';
a = document.getElementById('redo');
a.style.display = 'block';
return true;
}
function showActions(){
v = document.getElementById('loginDIV');
v.style.display = 'none';
x = document.getElementById('registerDIV');
x.style.display = 'none';
z = document.getElementById('selectAction');
z.style.display = 'block';
a = document.getElementById('redo');
a.style.display = 'none';
return true;
}
} else if(document.all) { //msie
function showLogin(){
var style1 = document.all['loginDIV'].style;
style1.display = 'block';
var style2 = document.all['registerDIV'].style;
style2.display = 'none';
var style3 = document.all['selectAction'].style;
style3.display = 'none';
var style4 = document.all['redo'].style;
style4.display = 'block';
return true;
}
function showRegister(){
var style1 = document.all['loginDIV'].style;
style1.display = 'none';
var style2 = document.all['registerDIV'].style;
style2.display = 'block';
var style3 = document.all['selectAction'].style;
style3.display = 'none';
var style4 = document.all['redo'].style;
style4.display = 'block';
return true;
}
function showActions(){
var style1 = document.all['loginDIV'].style;
style1.display = 'none';
var style2 = document.all['registerDIV'].style;
style2.display = 'none';
var style3 = document.all['selectAction'].style;
style3.display = 'block';
var style4 = document.all['redo'].style;
style4.display = 'none';
return true;
}
}
echo "<tr>
<td colspan=\"3\"><input type=\"checkbox\" group=\"abc\" name=\"loginBOX\" value=\"\" onChange=\"javascript:showLogin();\"> Login</td>
</tr>
<tr>
<td colspan=\"3\"><input type=\"checkbox\" name=\"registerBOX\" group=\"123\" value=\"\" onChange=\"javascript:showRegister();\"> Register</td>
</tr>";
TIA.