Link to home
Start Free TrialLog in
Avatar of CementTruck
CementTruck

asked on

Need a specific Javascript function on page load

Hello Experts,

I have the following javascript function on my page.

<SCRIPT LANGUAGE="Javascript" TYPE="text/javascript">


function showall()
{
  document.getElementById('showall').style.display = "none";
  document.getElementById('hideall').style.display = "inline";
}

function hideall()
{
  document.getElementById('showall').style.display = "inline";
  document.getElementById('hideall').style.display = "none";
}
</SCRIPT>



On the page I have a form. The form is hidden until the "ShowAll" function is triggered. The form has a table with multiple submit buttons that reorder the columns. Hitting each submit causes the page to reload, thereby causing the form/table to be hidden again.

I also have a Hidden Field that lets me know when the form was submitted.

Here's the question: How do I get the javascript "ShowAll" function to be pervasively "Inline"? I'm trying to do an IF statement on page load that looks for the form.hiddenfield and causes the "ShowAll" function to be the active function. Is this achievable?

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CementTruck
CementTruck

ASKER

Thank you!
You're welcome, thanks for the points!