elementis0
12-21-2007, 04:53 AM
Hello, I am developing a website and need a little help as I do not fully know JS.
My problem is that I want my webpage to not load anything else but the stuff in the noscript tag once the page is loaded.
I already have a concept on how this should be done except I dont know how to write JS to make this happen.
Basically I have all the div's I want to hide set to where class="hide"
I Need a javascript function the gets the class of each div when the page loads.
if the class="hide" I want it to change the class to something else so it would load the page such as class="null"
My idea for the JS would be something like
window.onload = document.getElementByClass("hide").Classname="null";
but that idea did not work.
so how is the JS supposed to be written so that it changes the classnames of all the divs where class="hide" to a value of class="null"?
My problem is that I want my webpage to not load anything else but the stuff in the noscript tag once the page is loaded.
I already have a concept on how this should be done except I dont know how to write JS to make this happen.
Basically I have all the div's I want to hide set to where class="hide"
I Need a javascript function the gets the class of each div when the page loads.
if the class="hide" I want it to change the class to something else so it would load the page such as class="null"
My idea for the JS would be something like
window.onload = document.getElementByClass("hide").Classname="null";
but that idea did not work.
so how is the JS supposed to be written so that it changes the classnames of all the divs where class="hide" to a value of class="null"?