View Full Version : Javascript or CSS to hide a line once the page has been loaded....
StagePhotography.co.uk
28th September 2006, 12:45 AM
ok chaps..
I got a line at the top of my website..
"If you are not on broadband you may want to visit the HTML version of this site by clicking here."
I want that to disappear but leave the gap once the FLASH/page has fully loaded..
http://www.myworldmyeyes.co.uk/
You can see it at the top..
Can't do it in FLASH as it's out of the flash area..
any ideas?
george.monaghan
28th September 2006, 01:33 AM
Hi George,
mabye stupid of me but 2 things spring to mind:
1) If you are on broadband why would you want to switch to dial up? Lose that option from the braodband page.
2) When are you given the choice to switch? No point if the images are loading to switch either way.
When you type your site url at the first page option give the choice to switch to flash broadband or html if you are on dialup. Lose the tag on the broadband page to switch back to dial up as it is not needed.
If the user on dial up opts for the slow option then force another new page with the option omitted and your site images then load on a fresh page with no header.
Nice site and I like it. I am on 10MB cable so the site loads in less than a second but there does not appear to be a "blank/intro" page to allow a switch to either option. Your title header and 2 links to either option as an intro would work or you could simply opt for the one option - the flash enabled site.
To have that header message disappear would probably require to redraw the page but that would slow, again, the dial up people.
Just a thought but cut the problem in half with taking the option from the flash area, it is not needed - at least I dont think so, as per point 2.
Good clean site, nice images - how long does it take to fully open in dial up? Answer that question and that will probably negate having the options there at all.
Cheers,
George Monaghan
george.monaghan
28th September 2006, 02:17 AM
Hi Again George,
had another wee look at the site and the flash size is 3186 with the html page being 2751. A difference of 435, approx 75 seconds or so on dial up.
Not a lot to wait really but the choice is yours to give the two options.
Cheers,
George.
Krazy Pengwin
28th September 2006, 07:27 AM
George,
You need a combination of Javascript and CSS for this:
Change this section
<FONT SIZE=2>
<B>If you are not on broadband you may want to visit the HTML version of this site by
<A HREF="html.shtml">
<FONT COLOR=PURPLE>clicking here</FONT>
</A>.</B></FONT>
to
<div id="hideme">
<FONT SIZE=2>
<B>If you are not on broadband you may want to visit the HTML version of this site by
<A HREF="html.shtml">
<FONT COLOR=PURPLE>clicking here</FONT>
</A>.</B></FONT>
</div>
add this to the head section
<style type="text/css" media="screen">
#hideme { display:block; }
</style>
then change the opening body tag to
<body background="background.jpg" onload="document.getElementById('hideme').style.display='n one';">
The onload event of the body tag should fire once the page has loaded, therefore hiding the text after the page has been fully displayed.
StagePhotography.co.uk
28th September 2006, 08:38 AM
Hi Again George,
had another wee look at the site and the flash size is 3186 with the html page being 2751. A difference of 435, approx 75 seconds or so on dial up.
Not a lot to wait really but the choice is yours to give the two options.
Cheers,
George.
Yeah I know, it's a work in progress, going to have to have less
images on the main front page, or smaller ones...
I want to give anyone going to either page the chance to switch,
someone searching on google might go to the HTML site first,
and then want to go to the flash site....
I'm aiming to be adaptable..
Thanks for the input though...
StagePhotography.co.uk
28th September 2006, 08:44 AM
George,
You need a combination of Javascript and CSS for this:
[Blah blah]
The onload event of the body tag should fire once the page has loaded, therefore hiding the text after the page has been fully displayed.
Yes I knew it was something like that... :)
Many thanks I'll add it over the weekend... :)
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.