If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Junior Member
    Join Date
    Oct 2009
    Member #
    I'm preparing to launch a new website for the company I work for. It's got a basic JavaScript at the beginning of each page which loads a random header image, and then I put in an iframe on the side of the page which pulls in our online banking login screen - a .vm file (and takes a good 5-10 seconds to load, probably because of the speed of our server).

    For some reason each time whenever I load a page, the header JavaScript seems to be WAITING for the iframe to load before it generates the header image. This is kind of an awkward wait...I wouldn't mind so much if it were only the iframe login box that was taking so long, but I want the main header to load FAST!

    I purposely avoided using frames due to all the complaints I've heard about them, but should I be using frames in this case, so there's no major wait each time a page is loaded?

    Following is the little bit of code I have on each page. Under body OnLoad it selects one of these images, then sets it as a table cell background. Is there anything I can add to help things load more smoothly?
    <script type="text/javascript" language="JavaScript">
    MyImages=new Array();

    function newImage()
    document.getElementById("mainImage").setAttribute( "background", MyImages[Math.round(Math.random()*3)])


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 07:22 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: