G
Guest
Hi
I've managed to figure out how to write some code which acts to
show/hide sections of a web page. The code is below:
function showreimburse(){
document.getElementById("reimburse").style.display="block";
}
function hidereimburse(){
document.getElementById("reimburse").style.display="none";
}
function showreimburselength(){
document.getElementById("reimburselength").style.display="block";
}
function hidereimburselength(){
document.getElementById("reimburselength").style.display="none";
}
function showq2b(){
document.getElementById("q2b").style.display="block";
}
function hideq2b(){
document.getElementById("q2b").style.display="none";
}
function showwhere(){
document.getElementById("where").style.display="block";
}
function hidewhere(){
document.getElementById("where").style.display="none";
}
function showquestion3a(){
document.getElementById("question3a").style.display="block";
}
function hidequestion3a(){
document.getElementById("question3a").style.display="none";
}
which I trigger in the web page with this sort of thing. All fine so
far. However is it possible to write the javascript in a more
effiecient manner.
Thanks for reading.
Alex
I've managed to figure out how to write some code which acts to
show/hide sections of a web page. The code is below:
function showreimburse(){
document.getElementById("reimburse").style.display="block";
}
function hidereimburse(){
document.getElementById("reimburse").style.display="none";
}
function showreimburselength(){
document.getElementById("reimburselength").style.display="block";
}
function hidereimburselength(){
document.getElementById("reimburselength").style.display="none";
}
function showq2b(){
document.getElementById("q2b").style.display="block";
}
function hideq2b(){
document.getElementById("q2b").style.display="none";
}
function showwhere(){
document.getElementById("where").style.display="block";
}
function hidewhere(){
document.getElementById("where").style.display="none";
}
function showquestion3a(){
document.getElementById("question3a").style.display="block";
}
function hidequestion3a(){
document.getElementById("question3a").style.display="none";
}
which I trigger in the web page with this sort of thing. All fine so
far. However is it possible to write the javascript in a more
effiecient manner.
Thanks for reading.
Alex