CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Show and Hide Button

Print topic Send  topic

Author Message
Karim
Posted: 04/28/2003, 10:35 AM

What code would I use to Show and Hide using a button to toggle a Grid?

Thanks,
Karim
Karim
Posted: 05/01/2003, 1:53 PM

Has anyone come accross this?

Thanks,
Karim
lneisius
Posted: 05/01/2003, 4:55 PM

try this:
http://www.codechargers.net/viewtopic.php?t=262&highlight=hide+button
remeber that at this time it would only work in the forms before show event and not the buttons before show, this may be fixed with the newer updates and I would try the buttons before show event first and if it didn't work then use the forms before show event.
hope this helps.
Karim
Posted: 05/02/2003, 8:00 AM

lneisius,

I don't this that would help, I am tring to create a Button which would Hide a grid when I pressed the button and when I pressed the button again, would show a grid, does that make sense?

Thanks,
Karim
Hamilton
Posted: 05/02/2003, 8:45 AM

Example code

<html><head><title>Hide 'N' Show</title>
<style type="text/css">
body {width:100%}
div {position:absolute;border:medium inset;}
div.HNS {visibility:hidden}
div.SNH {position:absolute;visibility:shown;}
</style>
<script language="javascript">
IsVisible="";
function IsVObjType(){return }
function DoIt() {
// default for NS, function replaced if IE;
arguments[0].visibility="show";
var OldObj=eval("document.layers."+IsVisible);
OldObj.visibility="hiden";
arguments[0].visibility="show";
IsVisible=arguments[0].id;
}

function PlayIt() {
// Used once to establish content of function DoIt();
// then it is re-assigned to DoIt();
var x=arguments[0];
if (document.all)
DoIt=new Function ('{var x=arguments[0];var '+
'OldObj=eval(IsVisible);OldObj.className="HNS"; '+
'x.className="SHN"; IsVisible=x.id;}');
IsVisible=x.id; // Store Current id;
DoIt(x); // Do the Deed;
PlayIt=DoIt; // Redirect this function to DoIt;

}
</script>
</head>
<body>
<div id="d1" name="d1" class="HNS"
style="top:120;left:120;border-color:red">Div1</div>
<div id="d2" name="d2" class="HNS"
style="top:120;left:120;border-color:white">Div2</div>
<div id="d3" name="d3" class="HNS"
style="top:120;left:120;border-color:green">Div3</div>
<div id="d0" name="d0" class="HNS"
style="top:120;left:120;border-color:blue;">Div0</div>
<a href="# " onclick="PlayIt(d0)">Show Div0</a><br>
<a href="# " onclick="PlayIt(d1)">Show Div1</a><br>
<a href="# " onclick="PlayIt(d2)">Show Div2</a><br>
<a href="# " onclick="PlayIt(d3)">Show Div3</a><br>
</body></html>

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.