pharma
06-12-2004, 12:03 PM
Ok lets start.
Im working on a page that has this "loading effect." As the page loads, the content of the page is hidden and there is this text/image that is visible to say to the viewer that the page is still loading. The image/text will disappear as page completely loads everything, and the content will be visible.
This effect is easy to code but my problem is... I can only add javascripts and css to the template. I could not insert any layer ID or even modify any tag within the template. So, I need to work on the Javascript and CSS to be inserted so that I could modify the looks and effects of the page.
Here is what I did...
Since the entire page is inside one table... this is what I did.
<STYLE type=text/css>
table, td {
background-color: transparent;
display: none
}
</STYLE>
Nevermind the background-color... lets concentrate on the topic. I made the table unseen by default so that as the visitor enters the page... he/she could see nothing.
Then I added this script for the loading effect...
<script language="JavaScript">
function load(){
hide('ld')
}
function show(name){
document.all[name].style.visibility='visible'}
function hide(name){
document.all[name].style.visibility='hidden'}
window.onload = load;
</script>
<div id="ld" style="visibility: visible">LOADING.. please wait.</div>
So, my problem is... how to make the table to show again as the page loads? Since I made the table property into hidden using CSS.... how could I make it visible again using JS so that I could include it with the load function?
Thank you in advance! :thumbsup:
Im working on a page that has this "loading effect." As the page loads, the content of the page is hidden and there is this text/image that is visible to say to the viewer that the page is still loading. The image/text will disappear as page completely loads everything, and the content will be visible.
This effect is easy to code but my problem is... I can only add javascripts and css to the template. I could not insert any layer ID or even modify any tag within the template. So, I need to work on the Javascript and CSS to be inserted so that I could modify the looks and effects of the page.
Here is what I did...
Since the entire page is inside one table... this is what I did.
<STYLE type=text/css>
table, td {
background-color: transparent;
display: none
}
</STYLE>
Nevermind the background-color... lets concentrate on the topic. I made the table unseen by default so that as the visitor enters the page... he/she could see nothing.
Then I added this script for the loading effect...
<script language="JavaScript">
function load(){
hide('ld')
}
function show(name){
document.all[name].style.visibility='visible'}
function hide(name){
document.all[name].style.visibility='hidden'}
window.onload = load;
</script>
<div id="ld" style="visibility: visible">LOADING.. please wait.</div>
So, my problem is... how to make the table to show again as the page loads? Since I made the table property into hidden using CSS.... how could I make it visible again using JS so that I could include it with the load function?
Thank you in advance! :thumbsup: