Preloading images in a MasterPage

Discussion in 'ASP .Net' started by Charlie@CBFC, Nov 27, 2007.

  1. Charlie@CBFC

    Charlie@CBFC Guest

    Hi:

    Before MasterPage, I preloaded images for rollovers in HEAD section no
    problem. Doesn't seem to work with MasterPage. Using same code, images
    never load. Always pulled from disk. Am I missing something?

    Thanks,
    Charlie
     
    Charlie@CBFC, Nov 27, 2007
    #1
    1. Advertising

  2. On Nov 27, 1:26 pm, "Charlie@CBFC" <> wrote:
    > Hi:
    >
    > Before MasterPage, I preloaded images for rollovers in HEAD section no
    > problem. Doesn't seem to work with MasterPage. Using same code, images
    > never load. Always pulled from disk. Am I missing something?
    >
    > Thanks,
    > Charlie


    Post the code here, please.
     
    Alexey Smirnov, Nov 27, 2007
    #2
    1. Advertising

  3. Charlie@CBFC

    Charlie@CBFC Guest

    Thanks for responding. Here is the HEAD section...

    <head>

    <title>CBF Consulting LLC</title>
    <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
    <meta content="C#" name="CODE_LANGUAGE">
    <meta content="JavaScript" name="vs_defaultClientScript">
    <meta content="http://schemas.microsoft.com/intellisense/ie5"
    name="vs_targetSchema">

    <script>
    if (document.images)
    {
    CustomerVehicleSmallOver = new Image();
    CustomerVehicleSmallOver.src =
    "Images/CustomerVehicleSmallOver.jpg";

    HistorySmallOver = new Image();
    HistorySmallOver.src = "Images/HistorySmallOver.jpg";

    PartsEditorSmallOver = new Image();
    PartsEditorSmallOver.src = "Images/PartsEditorSmallOver.jpg";

    InvoiceSmallOver = new Image();
    InvoiceSmallOver.src = "Images/InvoiceSmallOver.jpg";

    AboutMeOver = new Image();
    AboutMeOver.src = "TabImages/AboutMeOver.jpg";

    CustomSoftwareOver = new Image();
    CustomSoftwareOver.src = "TabImages/CustomSoftwareOver.jpg";

    ECommerceOver = new Image();
    ECommerceOver.src = "TabImages/ECommerceOver.jpg";

    WebSitesOver.jpg = new Image();
    WebSitesOver.jpg.src = "TabImages/WebSitesOver.jpg";

    AutoPOSover = new Image();
    AutoPOSover.src = "TabImages/AutoPOSover.jpg";

    ContactMeOver.jpg = new Image();
    ContactMeOver.jpg.src = "TabImages/ContactMeOver.jpg";

    }
    </script>

    </head>
    "Alexey Smirnov" <> wrote in message
    news:...
    > On Nov 27, 1:26 pm, "Charlie@CBFC" <> wrote:
    >> Hi:
    >>
    >> Before MasterPage, I preloaded images for rollovers in HEAD section no
    >> problem. Doesn't seem to work with MasterPage. Using same code, images
    >> never load. Always pulled from disk. Am I missing something?
    >>
    >> Thanks,
    >> Charlie

    >
    > Post the code here, please.
     
    Charlie@CBFC, Nov 27, 2007
    #3
  4. Charlie@CBFC

    Charlie@CBFC Guest

    My fault. Early morning syntax errors. Mind can play tricks on ya!


    "Charlie@CBFC" <> wrote in message
    news:...
    > Thanks for responding. Here is the HEAD section...
    >
    > <head>
    >
    > <title>CBF Consulting LLC</title>
    > <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
    > <meta content="C#" name="CODE_LANGUAGE">
    > <meta content="JavaScript" name="vs_defaultClientScript">
    > <meta content="http://schemas.microsoft.com/intellisense/ie5"
    > name="vs_targetSchema">
    >
    > <script>
    > if (document.images)
    > {
    > CustomerVehicleSmallOver = new Image();
    > CustomerVehicleSmallOver.src =
    > "Images/CustomerVehicleSmallOver.jpg";
    >
    > HistorySmallOver = new Image();
    > HistorySmallOver.src = "Images/HistorySmallOver.jpg";
    >
    > PartsEditorSmallOver = new Image();
    > PartsEditorSmallOver.src = "Images/PartsEditorSmallOver.jpg";
    >
    > InvoiceSmallOver = new Image();
    > InvoiceSmallOver.src = "Images/InvoiceSmallOver.jpg";
    >
    > AboutMeOver = new Image();
    > AboutMeOver.src = "TabImages/AboutMeOver.jpg";
    >
    > CustomSoftwareOver = new Image();
    > CustomSoftwareOver.src = "TabImages/CustomSoftwareOver.jpg";
    >
    > ECommerceOver = new Image();
    > ECommerceOver.src = "TabImages/ECommerceOver.jpg";
    >
    > WebSitesOver.jpg = new Image();
    > WebSitesOver.jpg.src = "TabImages/WebSitesOver.jpg";
    >
    > AutoPOSover = new Image();
    > AutoPOSover.src = "TabImages/AutoPOSover.jpg";
    >
    > ContactMeOver.jpg = new Image();
    > ContactMeOver.jpg.src = "TabImages/ContactMeOver.jpg";
    >
    > }
    > </script>
    >
    > </head>
    > "Alexey Smirnov" <> wrote in message
    > news:...
    >> On Nov 27, 1:26 pm, "Charlie@CBFC" <> wrote:
    >>> Hi:
    >>>
    >>> Before MasterPage, I preloaded images for rollovers in HEAD section no
    >>> problem. Doesn't seem to work with MasterPage. Using same code, images
    >>> never load. Always pulled from disk. Am I missing something?
    >>>
    >>> Thanks,
    >>> Charlie

    >>
    >> Post the code here, please.

    >
    >
     
    Charlie@CBFC, Nov 27, 2007
    #4
  5. On Nov 27, 6:08 pm, "Charlie@CBFC" <> wrote:
    > My fault. Early morning syntax errors. Mind can play tricks on ya!
    >
    > "Charlie@CBFC" <> wrote in message
    >
    > news:...
    >
    >
    >
    > > Thanks for responding. Here is the HEAD section...

    >
    > > <head>

    >
    > > <title>CBF Consulting LLC</title>
    > > <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
    > > <meta content="C#" name="CODE_LANGUAGE">
    > > <meta content="JavaScript" name="vs_defaultClientScript">
    > > <meta content="http://schemas.microsoft.com/intellisense/ie5"
    > > name="vs_targetSchema">

    >
    > > <script>
    > > if (document.images)
    > > {
    > > CustomerVehicleSmallOver = new Image();
    > > CustomerVehicleSmallOver.src =
    > > "Images/CustomerVehicleSmallOver.jpg";

    >
    > > HistorySmallOver = new Image();
    > > HistorySmallOver.src = "Images/HistorySmallOver.jpg";

    >
    > > PartsEditorSmallOver = new Image();
    > > PartsEditorSmallOver.src = "Images/PartsEditorSmallOver.jpg";

    >
    > > InvoiceSmallOver = new Image();
    > > InvoiceSmallOver.src = "Images/InvoiceSmallOver.jpg";

    >
    > > AboutMeOver = new Image();
    > > AboutMeOver.src = "TabImages/AboutMeOver.jpg";

    >
    > > CustomSoftwareOver = new Image();
    > > CustomSoftwareOver.src = "TabImages/CustomSoftwareOver.jpg";

    >
    > > ECommerceOver = new Image();
    > > ECommerceOver.src = "TabImages/ECommerceOver.jpg";

    >
    > > WebSitesOver.jpg = new Image();
    > > WebSitesOver.jpg.src = "TabImages/WebSitesOver.jpg";

    >
    > > AutoPOSover = new Image();
    > > AutoPOSover.src = "TabImages/AutoPOSover.jpg";

    >
    > > ContactMeOver.jpg = new Image();
    > > ContactMeOver.jpg.src = "TabImages/ContactMeOver.jpg";

    >
    > > }
    > > </script>

    >
    > > </head>
    > > "Alexey Smirnov" <> wrote in message
    > >news:...
    > >> On Nov 27, 1:26 pm, "Charlie@CBFC" <> wrote:
    > >>> Hi:

    >
    > >>> Before MasterPage, I preloaded images for rollovers in HEAD section no
    > >>> problem. Doesn't seem to work with MasterPage. Using same code, images
    > >>> never load. Always pulled from disk. Am I missing something?

    >
    > >>> Thanks,
    > >>> Charlie

    >
    > >> Post the code here, please.- Hide quoted text -

    >
    > - Show quoted text -


    glad it works for you
     
    Alexey Smirnov, Nov 27, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGFuaWVsIFdlbGxlc2xleQ==?=

    Preloading Images into Javascript variables

    =?Utf-8?B?RGFuaWVsIFdlbGxlc2xleQ==?=, Aug 4, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    277
    =?Utf-8?B?RGFuaWVsIFdlbGxlc2xleQ==?=
    Aug 4, 2004
  2. =?Utf-8?B?RGFuaWVsIFdlbGxlc2xleQ==?=

    Preloading Images into Javascript variables

    =?Utf-8?B?RGFuaWVsIFdlbGxlc2xleQ==?=, Aug 7, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    447
    =?Utf-8?B?RGFuaWVsIFdlbGxlc2xleQ==?=
    Aug 7, 2004
  3. Replies:
    1
    Views:
    623
    Oliver Wong
    Nov 13, 2006
  4. Miro

    Preloading Images

    Miro, Oct 23, 2009, in forum: ASP .Net
    Replies:
    4
    Views:
    1,845
  5. Fabian

    Preloading images?

    Fabian, Oct 25, 2003, in forum: Javascript
    Replies:
    22
    Views:
    282
    Lasse Reichstein Nielsen
    Oct 26, 2003
Loading...

Share This Page