Hi All,
can anybody help with the following problem?
I have written a jsp page, which works perfectly. I want to show/hide a certain part (the bottom) of the resulting html page on some action from the user (f.e. user pushes a button, or clicks on a link). I want to solve this using JavaScript DIV-s, and I am a newbie.
For example my hide function could be somefin like dis:
----------------------------------------------------------------
----------------------------------------------------------------
then i can use a button somefin like dis:
where 'divbottom' is the name of my DIV.
OK so far, but how can i put parts of my jsp into my DIV? When I put that bottom part of my jsp in between
<div id="divbottom" class="showhide">
and
</div>
it stopped working. How can i solve this problem? Can i put lines of my jsp into DIV-s? Any help is appreciated.
thx, heeeeep
can anybody help with the following problem?
I have written a jsp page, which works perfectly. I want to show/hide a certain part (the bottom) of the resulting html page on some action from the user (f.e. user pushes a button, or clicks on a link). I want to solve this using JavaScript DIV-s, and I am a newbie.
For example my hide function could be somefin like dis:
----------------------------------------------------------------
Code:
function hide( objectId ){
// W3C & Netscape 6
if(document.getElementById && document.getElementById(objectId))
{
document.getElementById(objectId).style.visibility = "hidden";
document.getElementById(objectId).style.display = "none";
shown[objectId] = false ;
}
// browser is IE 4+:
else if (document.all && document.all(objectId)) {
document.all(objectId).style.visibility = "hidden" ;
document.all(objectId).style.display = "none" ;
shown[objectId] = false ;
}
// browser is Netscape 4+:
else if (document.layers && document.layers[objectId]) {
document.layers[objectId].visibility = "hide" ;
document.layers[objectId].display = "none" ;
shown[objectId] = false ;
}
else {
return false;
}
}
then i can use a button somefin like dis:
Code:
<input type=button name="view" value="hide bottom" onClick="hide( 'divbottom');">
where 'divbottom' is the name of my DIV.
OK so far, but how can i put parts of my jsp into my DIV? When I put that bottom part of my jsp in between
<div id="divbottom" class="showhide">
and
</div>
it stopped working. How can i solve this problem? Can i put lines of my jsp into DIV-s? Any help is appreciated.
thx, heeeeep