I have an index.php that generates a set of forms.
I want to setup javascript to hide / show on demand.
Instead of scrolling through all the forms, I want to have a section of buttons that you press to VIEW a specific form.
So, I have the following setup...
in my page...
Code: Select all
<body OnLoad="hide( getElementById( 'AddEmpire' ) )">
<form id="AddEmpire"><insert form stuff here></form>
<form id="blah...
etc, etc...Code: Select all
function hide(obj)
{
var theObj = getObject(obj);
if (theObj)
{
theObj.visibility = "hidden";
}
}Code: Select all
<body OnLoad="HideAllForms()">Code: Select all
function HideAllForms()
{
for ( var i=0; i=document.forms.length ; i++ )
{
document.Form(i).style.visibility = "hidden";
}
}Code: Select all
function HideAllForms()
{
var var_AllForms = document.getElementByTagName('form');
for ( var i=0; i=document.forms.length ; i++ )
{
var_AllFormsїi].style.visibility = "hidden";
}
}What I want to do is have a HIDE ALL FORMS function to drop them all hidden... THEN I want to setup the buttons to SHOW those same forms...
I am having the devils own time trying to access them...
I keep getting not valid object errors...
all sorts of stuff...
it really blows...
Help if you can... Thanks in advance...