troubleshooting Question

Need a specific Javascript function on page load

Avatar of CementTruck
CementTruck asked on
3 Comments1 Solution181 ViewsLast Modified:
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";

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.
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros