Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 05-02-2008, 12:25 PM   #1
Member (6 bit)
 
Join Date: Jan 2003
Posts: 56
Display header image before text shows

Hi,

I'm building a website for a client and they wish to have the header image load and appear before any text is viewable. So basically, when you go to http://www.website.com, the header graphic must load and be seen completely, and then the remaining content shows up. I was given some code to use as the workaround but it does not accomplish the task. I will paste the code here and the test url is http://www.sanhandesign.com/smbizcentral/test.html

Here is the code. Thanks!




Untitled Document







text to wait


lilpenny1316 is offline   Reply With Quote
Old 05-03-2008, 12:03 PM   #2
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
You could try the code I wrote below, but I wouldn't reccommend this technique, especially since this is a business and javascript isn't *always* enabled in browsers.

Bascially, I'd tell the guy (not in these exact words of course, but the general sentiment) no to not be so picky and you don't really have control over how fast or slow users download webpages. That's why the image may or may not load before the rest of the text, and that the HTML code downloads first before the images, since the images are only tags in the HTML.

[edit]: the code is attached...it wouldn't display properly here in the CODE tags.


In this code, I added an "onload" function in the body tag to call the "doShow" javascript function. once the body loads completely, this will be called and unhide the "content" div.

I've included two other javascript functions...a doHide(), which does the opposite of doShow(), and a doShow_inline, in case you have problems when it displays the "content" div as a block element (although I've only needed this in one specific case).
Attached Files
File Type: txt showhide.txt (773 Bytes, 33 views)
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.

Last edited by Force Flow; 05-03-2008 at 12:05 PM.
Force Flow is offline   Reply With Quote
Old 05-03-2008, 12:07 PM   #3
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
[edit]:

I visited the link and something's not right....it should not be taking that long to load the yellow text along the side. Also, ,I can't view the source code.

Something's wrong with loading...it just sits there. I was able to open the source code in firefox and saw you were using FONT tags.

In a word, don't. Use CSS for styling and a doctype tag at the top. Use either HTML 4.01 strict or XHTML 4 strict.

Last edited by Force Flow; 05-03-2008 at 12:11 PM.
Force Flow is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text & video display problem on notebook Averatec 2260 ronaries Home Theater, Audio, and Video 4 12-19-2007 09:25 AM
Text Message EFG Tech Windows Tips, Tricks, and Tweaks 2 06-05-2006 06:38 AM
Dual Display problems - Nvidia mx440 + ATI rage 3d II TazZ_Nc Home Theater, Audio, and Video 0 12-10-2005 11:54 AM
DVD problem mystvearn Computer Hardware 10 11-23-2004 11:25 PM
Multiple display problem - please help !?! cam-27 Computer Hardware 1 05-01-2002 07:47 PM


All times are GMT -5. The time now is 07:36 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2