rollovers not preloading images, why?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave

    #1

    rollovers not preloading images, why?

    Hi,

    I have an app that uses rollover images, but the images are still pulled
    from the web server during a mouseover instead of being pulled from memory.
    The code is as follows:

    the javascript:
    <script language="JavaS cript">

    function MM_findObj(n, d) {
    var p,i,x; if(!d) d=document;
    if((p=n.indexOf ("?"))>0&&paren t.frames.length ) {
    d=parent.frames[n.substring(p+1 )].document; n=n.substring(0 ,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.fo rms.length;i++)
    x=d.forms[i][n];
    for(i=0;!x&&d.l ayers&&i<d.laye rs.length;i++)
    x=MM_findObj(n, d.layers[i].document);
    if(!x && d.getElementByI d) x=d.getElementB yId(n); return x;
    }

    function MM_swapImage() {
    var i,j=0,x,a=MM_sw apImage.argumen ts; document.MM_sr= new Array;
    for(i=0;i<(a.le ngth-2);i+=3)
    if ((x=MM_findObj( a[i]))!=null){docum ent.MM_sr[j++]=x; if(!x.oSrc)
    x.oSrc=x.src; x.src=a[i+2];}
    }
    function MM_swapImgResto re() {
    var i,x,a=document. MM_sr; for(i=0;a&&i<a. length&&(x=a[i])&&x.oSrc;i++ )
    x.src=x.oSrc;
    }

    if (document.image s) {
    tab1_f2 = new Image(150 ,23); tab1_f2.src = "images/tab1_f2.gif";
    tab1_f1 = new Image(150 ,23); tab1_f1.src = "images/tab1.gif";
    tab6_f2 = new Image(100 ,4); tab6_f2.src = "images/tab6_f2.gif";
    tab6_f1 = new Image(100 ,4); tab6_f1.src = "images/tab6.gif";
    tab7_f2 = new Image(50 ,4); tab7_f2.src = "images/tab7_f2.gif";
    tab7_f1 = new Image(50 ,4); tab7_f1.src = "images/tab7.gif";
    tab2_f3 = new Image(129 ,23); tab2_f3.src = "images/tab2_f3.gif";
    tab2_f1 = new Image(129 ,23); tab2_f1.src = "images/tab2.gif";
    kle_r10_c11_f3 = new Image(45 ,4); kle_r10_c11_f3. src =
    "images/kle_r10_c11_f3. gif";
    kle_r10_c11_f1 = new Image(45 ,4); kle_r10_c11_f1. src =
    "images/kle_r10_c11.gif ";
    tab8_f3 = new Image(84 ,4); tab8_f3.src = "images/tab8_f3.gif";
    tab8_f1 = new Image(84 ,4); tab8_f1.src = "images/tab8.gif";
    tab3_f4 = new Image(169 ,23); tab3_f4.src = "images/tab3_f4.gif";
    tab3_f1 = new Image(169 ,23); tab3_f1.src = "images/tab3.gif";
    kle_r10_c13_f4 = new Image(46 ,4); kle_r10_c13_f4. src =
    "images/kle_r10_c13_f4. gif";
    kle_r10_c13_f1 = new Image(46 ,4); kle_r10_c13_f1. src =
    "images/kle_r10_c13.gif ";
    tab9_f4 = new Image(93 ,4); tab9_f4.src = "images/tab9_f4.gif";
    tab9_f1 = new Image(93 ,4); tab9_f1.src = "images/tab9.gif";
    tab10_f4 = new Image(30 ,4); tab10_f4.src = "images/tab10_f4.gif";
    tab10_f1 = new Image(30 ,4); tab10_f1.src = "images/tab10.gif";
    tab4_f5 = new Image(121 ,23); tab4_f5.src = "images/tab4_f5.gif";
    tab4_f1 = new Image(121 ,23); tab4_f1.src = "images/tab4.gif";
    kle_r10_c16_f5 = new Image(115 ,4); kle_r10_c16_f5. src =
    "images/kle_r10_c16_f5. gif";
    kle_r10_c16_f1 = new Image(115 ,4); kle_r10_c16_f1. src =
    "images/kle_r10_c16.gif ";
    tab11_f5 = new Image(6 ,4); tab11_f5.src = "images/tab11_f5.gif";
    tab11_f1 = new Image(6 ,4); tab11_f1.src = "images/tab11.gif";
    tab5_f6 = new Image(139 ,23); tab5_f6.src = "images/tab5_f6.gif";
    tab5_f1 = new Image(139 ,23); tab5_f1.src = "images/tab5.gif";
    kle_r10_c20_f6 = new Image(139 ,4); kle_r10_c20_f6. src =
    "images/kle_r10_c20_f6. gif";
    kle_r10_c20_f1 = new Image(139 ,4); kle_r10_c20_f1. src =
    "images/kle_r10_c20.gif ";
    tab6_f7 = new Image(100 ,4); tab6_f7.src = "images/tab6_f7.gif";
    kle_r12_c4_f7 = new Image(100 ,23); kle_r12_c4_f7.s rc =
    "images/kle_r12_c4_f7.g if";
    kle_r12_c4_f1 = new Image(100 ,23); kle_r12_c4_f1.s rc =
    "images/kle_r12_c4.gif" ;
    tab7_f8 = new Image(50 ,4); tab7_f8.src = "images/tab7_f8.gif";
    kle_r10_c11_f8 = new Image(45 ,4); kle_r10_c11_f8. src =
    "images/kle_r10_c11_f8. gif";
    kle_r12_c10_f8 = new Image(95 ,23); kle_r12_c10_f8. src =
    "images/kle_r12_c10_f8. gif";
    kle_r12_c10_f1 = new Image(95 ,23); kle_r12_c10_f1. src =
    "images/kle_r12_c10.gif ";
    tab8_f9 = new Image(84 ,4); tab8_f9.src = "images/tab8_f9.gif";
    kle_r10_c13_f9 = new Image(46 ,4); kle_r10_c13_f9. src =
    "images/kle_r10_c13_f9. gif";
    kle_r12_c12_f9 = new Image(130 ,23); kle_r12_c12_f9. src =
    "images/kle_r12_c12_f9. gif";
    kle_r12_c12_f1 = new Image(130 ,23); kle_r12_c12_f1. src =
    "images/kle_r12_c12.gif ";
    tab9_f10 = new Image(93 ,4); tab9_f10.src = "images/tab9_f10.gif";
    kle_r12_c14_f10 = new Image(93 ,23); kle_r12_c14_f10 .src =
    "images/kle_r12_c14_f10 .gif";
    kle_r12_c14_f1 = new Image(93 ,23); kle_r12_c14_f1. src =
    "images/kle_r12_c14.gif ";
    tab10_f11 = new Image(30 ,4); tab10_f11.src = "images/tab10_f11.gif";
    kle_r10_c16_f11 = new Image(115 ,4); kle_r10_c16_f11 .src =
    "images/kle_r10_c16_f11 .gif";
    kle_r12_c15_f11 = new Image(145 ,23); kle_r12_c15_f11 .src =
    "images/kle_r12_c15_f11 .gif";
    kle_r12_c15_f1 = new Image(145 ,23); kle_r12_c15_f1. src =
    "images/kle_r12_c15.gif ";
    tab11_f12 = new Image(6 ,4); tab11_f12.src = "images/tab11_f12.gif";
    kle_r10_c20_f12 = new Image(139 ,4); kle_r10_c20_f12 .src =
    "images/kle_r10_c20_f12 .gif";
    kle_r12_c19_f12 = new Image(145 ,23); kle_r12_c19_f12 .src =
    "images/kle_r12_c19_f12 .gif";
    kle_r12_c19_f1 = new Image(145 ,23); kle_r12_c19_f1. src =
    "images/kle_r12_c19.gif ";

    }
    </script>


    THE IMAGE MAP:

    <map name="CARTMAP"> <area shape="RECT" coords="0,0,115 ,52"
    href="http://kieslerle/cart.aspx" alt="Click Here to view Shopping Cart"
    onMouseOut="MM_ swapImage('le_r 2_c10','','../images3/le_r2_c10.gif', 1);"
    onMouseOver="MM _swapImage('le_ r2_c10','','../images3/le_r2_c10_f2.gi f',1);">
    <area shape="RECT" coords="0,-23,115,29" href="http://kieslerle/cart.aspx"
    alt="Click Here to view Shopping Cart"
    onMouseOut="MM_ swapImage('le_r 2_c10','','../images3/le_r2_c10.gif', 1);"
    onMouseOver="MM _swapImage('le_ r2_c10','','../images3/le_r2_c10_f2.gi f',1);">
    <area shape="RECT" coords="-109,-23,6,29" href="http://kieslerle/cart.aspx"
    alt="Click Here to view Shopping Cart"
    onMouseOut="MM_ swapImage('le_r 2_c10','','../images3/le_r2_c10.gif', 1);"
    onMouseOver="MM _swapImage('le_ r2_c10','','../images3/le_r2_c10_f2.gi f',1);">
    <area shape="RECT" coords="0,-36,115,16" href="http://kieslerle/cart.aspx"
    alt="Click Here to view Shopping Cart"
    onMouseOut="MM_ swapImage('le_r 2_c10','','../images3/le_r2_c10.gif', 1);"
    onMouseOver="MM _swapImage('le_ r2_c10','','../images3/le_r2_c10_f2.gi f',1);">

    <area shape="RECT" coords="-109,-36,6,16" href="http://kieslerle/cart.aspx"
    alt="Click Here to view Shopping Cart"
    onMouseOut="MM_ swapImage('le_r 2_c10','','../images3/le_r2_c10.gif', 1);"
    onMouseOver="MM _swapImage('le_ r2_c10','','../images3/le_r2_c10_f2.gi f',1);">
    <area shape="RECT" coords="0,-49,115,3" href="http://kieslerle/cart.aspx"
    alt="Click Here to view Shopping Cart"
    onMouseOut="MM_ swapImage('le_r 2_c10','','../images3/le_r2_c10.gif', 1);"
    onMouseOver="MM _swapImage('le_ r2_c10','','../images3/le_r2_c10_f2.gi f',1);">
    </map><map name="m_tab1">< area shape="rect" coords="7,1,142 ,23"
    href="http://kieslerle/category.aspx?T ABID=1" alt="Weapons & Ammunition"
    onMouseOut="MM_ swapImage('tab1 ','','../images/tab1.gif','tab6 ','','../images
    /tab6.gif','tab7 ','','../images/tab7.gif',1);"
    onMouseOver="MM _swapImage('tab 1','','../images/tab1_f2.gif','t ab6','','../im
    ages/tab6_f2.gif','t ab7','','../images/tab7_f2.gif',1) ;" ></map><map
    name="m_tab2">< area shape="rect" coords="7,1,122 ,23"
    href="http://kieslerle/category.aspx?T ABID=2" alt="Weapon Accessories"
    onMouseOut="MM_ swapImage('tab2 ','','../images/tab2.gif','kle_ r10_c11','','..
    /images/kle_r10_c11.gif ','tab8','','../images/tab8.gif',1);"
    onMouseOver="MM _swapImage('tab 2','','../images/tab2_f3.gif','k le_r10_c11',''
    ,'../images/kle_r10_c11_f3. gif','tab8','', '../images/tab8_f3.gif',1) ;"[color=blue]
    ></map><map name="m_tab3">< area shape="rect" coords="7,1,162 ,23"[/color]
    href="http://kieslerle/category.aspx?T ABID=3" alt="Shields, Armor &
    Protection"
    onMouseOut="MM_ swapImage('tab3 ','','../images/tab3.gif','kle_ r10_c13','','..
    /images/kle_r10_c13.gif ','tab9','','../images/tab9.gif','tab1 0','','../image
    s/tab10.gif',1);"
    onMouseOver="MM _swapImage('tab 3','','../images/tab3_f4.gif','k le_r10_c13',''
    ,'../images/kle_r10_c13_f4. gif','tab9','', '../images/tab9_f4.gif','t ab10',''
    ,'../images/tab10_f4.gif',1 );" ></map><map name="m_tab4">< area shape="rect"
    coords="7,1,115 ,23" href="http://kieslerle/category.aspx?T ABID=4"
    alt="Training & Survival"
    onMouseOut="MM_ swapImage('tab4 ','','../images/tab4.gif','kle_ r10_c16','','..
    /images/kle_r10_c16.gif ','tab11','','. ./images/tab11.gif',1);"
    onMouseOver="MM _swapImage('tab 4','','../images/tab4_f5.gif','k le_r10_c16',''
    ,'../images/kle_r10_c16_f5. gif','tab11','' ,'../images/tab11_f5.gif',1 );"[color=blue]
    ></map><map name="m_tab5">< area shape="rect" coords="6,1,133 ,23"[/color]
    href="http://kieslerle/category.aspx?T ABID=5" alt="Optics, Lights & Vision"
    onMouseOut="MM_ swapImage('tab5 ','','../images/tab5.gif','kle_ r10_c20','','..
    /images/kle_r10_c20.gif ',1);"
    onMouseOver="MM _swapImage('tab 5','','../images/tab5_f6.gif','k le_r10_c20',''
    ,'../images/kle_r10_c20_f6. gif',1);" ></map><map name="m_tab6">< area
    shape="rect" coords="6,3,94, 26"
    href="http://kieslerle/category.aspx?T ABID=6" alt="Tactical & Duty"
    onMouseOut="MM_ swapImage('tab6 ','','../images/tab6.gif','kle_ r12_c4','','../
    images/kle_r12_c4.gif' ,1);"
    onMouseOver="MM _swapImage('tab 6','','../images/tab6_f7.gif','k le_r12_c4','',
    '../images/kle_r12_c4_f7.g if',1);" ></map><map name="m_kle_r12 _c4"><area
    shape="rect" coords="6,-1,94,22"
    href="http://kieslerle/category.aspx?T ABID=6" alt="Tactical & Duty"
    onMouseOut="MM_ swapImage('tab6 ','','../images/tab6.gif','kle_ r12_c4','','../
    images/kle_r12_c4.gif' ,1);"
    onMouseOver="MM _swapImage('tab 6','','../images/tab6_f7.gif','k le_r12_c4','',
    '../images/kle_r12_c4_f7.g if',1);" ></map><map name="m_tab7">< area
    shape="rect" coords="6,3,89, 26"
    href="http://kieslerle/category.aspx?T ABID=7" alt="Knives & Tools"
    onMouseOut="MM_ swapImage('tab7 ','','../images/tab7.gif','kle_ r10_c11','','..
    /images/kle_r10_c11.gif ','kle_r12_c10' ,'','../images/kle_r12_c10.gif ',1);"
    onMouseOver="MM _swapImage('tab 7','','../images/tab7_f8.gif','k le_r10_c11',''
    ,'../images/kle_r10_c11_f8. gif','kle_r12_c 10','','../images/kle_r12_c10_f8. g
    if',1);" ></map><map name="m_kle_r10 _c11"><area shape="rect"
    coords="-44,3,39,26" href="http://kieslerle/category.aspx?T ABID=7"
    alt="Knives & Tools"
    onMouseOut="MM_ swapImage('tab7 ','','../images/tab7.gif','kle_ r10_c11','','..
    /images/kle_r10_c11.gif ','kle_r12_c10' ,'','../images/kle_r12_c10.gif ',1);"
    onMouseOver="MM _swapImage('tab 7','','../images/tab7_f8.gif','k le_r10_c11',''
    ,'../images/kle_r10_c11_f8. gif','kle_r12_c 10','','../images/kle_r12_c10_f8. g
    if',1);" ></map><map name="m_kle_r12 _c10"><area shape="rect"
    coords="6,-1,89,22" href="http://kieslerle/category.aspx?T ABID=7"
    alt="Knives & Tools"
    onMouseOut="MM_ swapImage('tab7 ','','../images/tab7.gif','kle_ r10_c11','','..
    /images/kle_r10_c11.gif ','kle_r12_c10' ,'','../images/kle_r12_c10.gif ',1);"
    onMouseOver="MM _swapImage('tab 7','','../images/tab7_f8.gif','k le_r10_c11',''
    ,'../images/kle_r10_c11_f8. gif','kle_r12_c 10','','../images/kle_r12_c10_f8. g
    if',1);" ></map><map name="m_tab8">< area shape="rect" coords="6,3,125 ,26"
    href="http://kieslerle/category.aspx?T ABID=8" alt="Specialty Equipment"
    onMouseOut="MM_ swapImage('tab8 ','','../images/tab8.gif','kle_ r10_c13','','..
    /images/kle_r10_c13.gif ','kle_r12_c12' ,'','../images/kle_r12_c12.gif ',1);"
    onMouseOver="MM _swapImage('tab 8','','../images/tab8_f9.gif','k le_r10_c13',''
    ,'../images/kle_r10_c13_f9. gif','kle_r12_c 12','','../images/kle_r12_c12_f9. g
    if',1);" ></map><map name="m_kle_r10 _c13"><area shape="rect"
    coords="-78,3,41,26" href="http://kieslerle/category.aspx?T ABID=8"
    alt="Specialty Equipment"
    onMouseOut="MM_ swapImage('tab8 ','','../images/tab8.gif','kle_ r10_c13','','..
    /images/kle_r10_c13.gif ','kle_r12_c12' ,'','../images/kle_r12_c12.gif ',1);"
    onMouseOver="MM _swapImage('tab 8','','../images/tab8_f9.gif','k le_r10_c13',''
    ,'../images/kle_r10_c13_f9. gif','kle_r12_c 12','','../images/kle_r12_c12_f9. g
    if',1);" ></map><map name="m_kle_r12 _c12"><area shape="rect"
    coords="6,-1,125,22" href="http://kieslerle/category.aspx?T ABID=8"
    alt="Specialty Equipment"
    onMouseOut="MM_ swapImage('tab8 ','','../images/tab8.gif','kle_ r10_c13','','..
    /images/kle_r10_c13.gif ','kle_r12_c12' ,'','../images/kle_r12_c12.gif ',1);"
    onMouseOver="MM _swapImage('tab 8','','../images/tab8_f9.gif','k le_r10_c13',''
    ,'../images/kle_r10_c13_f9. gif','kle_r12_c 12','','../images/kle_r12_c12_f9. g
    if',1);" ></map><map name="m_tab9">< area shape="rect" coords="6,3,87, 26"
    href="http://kieslerle/category.aspx?T ABID=9" alt="Miscellane ous"
    onMouseOut="MM_ swapImage('tab9 ','','../images/tab9.gif','kle_ r12_c14','','..
    /images/kle_r12_c14.gif ',1);"
    onMouseOver="MM _swapImage('tab 9','','../images/tab9_f10.gif',' kle_r12_c14','
    ','../images/kle_r12_c14_f10 .gif',1);" ></map><map
    name="m_kle_r12 _c14"><area shape="rect" coords="6,-1,87,22"
    href="http://kieslerle/category.aspx?T ABID=9" alt="Miscellane ous"
    onMouseOut="MM_ swapImage('tab9 ','','../images/tab9.gif','kle_ r12_c14','','..
    /images/kle_r12_c14.gif ',1);"
    onMouseOver="MM _swapImage('tab 9','','../images/tab9_f10.gif',' kle_r12_c14','
    ','../images/kle_r12_c14_f10 .gif',1);" ></map><map name="m_tab10"> <area
    shape="rect" coords="6,3,138 ,26"
    href="http://kieslerle/category.aspx?T ABID=10" alt="Government & Military"
    onMouseOut="MM_ swapImage('tab1 0','','../images/tab10.gif','kle _r10_c16','','
    .../images/kle_r10_c16.gif ','kle_r12_c15' ,'','../images/kle_r12_c15.gif ',1);"
    onMouseOver="MM _swapImage('tab 10','','../images/tab10_f11.gif', 'kle_r10_c16'
    ,'','../images/kle_r10_c16_f11 .gif','kle_r12_ c15','','../images/kle_r12_c15_
    f11.gif',1);" ></map><map name="m_kle_r10 _c16"><area shape="rect"
    coords="-24,3,108,26" href="http://kieslerle/category.aspx?T ABID=10"
    alt="Government & Military"
    onMouseOut="MM_ swapImage('tab1 0','','../images/tab10.gif','kle _r10_c16','','
    .../images/kle_r10_c16.gif ','kle_r12_c15' ,'','../images/kle_r12_c15.gif ',1);"
    onMouseOver="MM _swapImage('tab 10','','../images/tab10_f11.gif', 'kle_r10_c16'
    ,'','../images/kle_r10_c16_f11 .gif','kle_r12_ c15','','../images/kle_r12_c15_
    f11.gif',1);" ></map><map name="m_kle_r12 _c15"><area shape="rect"
    coords="6,-1,138,22" href="http://kieslerle/category.aspx?T ABID=10"
    alt="Government & Military"
    onMouseOut="MM_ swapImage('tab1 0','','../images/tab10.gif','kle _r10_c16','','
    .../images/kle_r10_c16.gif ','kle_r12_c15' ,'','../images/kle_r12_c15.gif ',1);"
    onMouseOver="MM _swapImage('tab 10','','../images/tab10_f11.gif', 'kle_r10_c16'
    ,'','../images/kle_r10_c16_f11 .gif','kle_r12_ c15','','../images/kle_r12_c15_
    f11.gif',1);" ></map><map name="m_tab11"> <area shape="rect"
    coords="5,3,139 ,26" href="http://kieslerle/business.aspx?T ABID=11"
    alt="Doing Business With Kieslers"
    onMouseOut="MM_ swapImage('tab1 1','','../images/tab11.gif','kle _r10_c20','','
    .../images/kle_r10_c20.gif ','kle_r12_c19' ,'','../images/kle_r12_c19.gif ',1);"
    onMouseOver="MM _swapImage('tab 11','','../images/tab11_f12.gif', 'kle_r10_c20'
    ,'','../images/kle_r10_c20_f12 .gif','kle_r12_ c19','','../images/kle_r12_c19_
    f12.gif',1);" ></map><map name="m_kle_r10 _c20"><area shape="rect"
    coords="-1,3,133,26" href="http://kieslerle/business.aspx?T ABID=11"
    alt="Doing Business With Kieslers"
    onMouseOut="MM_ swapImage('tab1 1','','../images/tab11.gif','kle _r10_c20','','
    .../images/kle_r10_c20.gif ','kle_r12_c19' ,'','../images/kle_r12_c19.gif ',1);"
    onMouseOver="MM _swapImage('tab 11','','../images/tab11_f12.gif', 'kle_r10_c20'
    ,'','../images/kle_r10_c20_f12 .gif','kle_r12_ c19','','../images/kle_r12_c19_
    f12.gif',1);" ></map><map name="m_kle_r12 _c19"><area shape="rect"
    coords="5,-1,139,22" href="http://kieslerle/business.aspx?T ABID=11"
    alt="Doing Business With Kieslers"
    onMouseOut="MM_ swapImage('tab1 1','','../images/tab11.gif','kle _r10_c20','','
    .../images/kle_r10_c20.gif ','kle_r12_c19' ,'','../images/kle_r12_c19.gif ',1);"
    onMouseOver="MM _swapImage('tab 11','','../images/tab11_f12.gif', 'kle_r10_c20'
    ,'','../images/kle_r10_c20_f12 .gif','kle_r12_ c19','','../images/kle_r12_c19_
    f12.gif',1);" ></map>



    THE TABLE CONTAINING THE IMAGES THAT ROLLOVER:

    <table border="0" cellpadding="0" cellspacing="0" width="708"><tr ><td><table
    border="0" cellpadding="0" cellspacing="0" width="708"><tr ><td><img
    name="tab1" src="../images/tab1.gif" width="150" height="23" border="0"
    usemap="#m_tab1 " alt=""></td><td><img name="tab2" src="../images/tab2.gif"
    width="129" height="23" border="0" usemap="#m_tab2 " alt=""></td><td><img
    name="tab3" src="../images/tab3.gif" width="169" height="23" border="0"
    usemap="#m_tab3 " alt=""></td><td><img name="tab4" src="../images/tab4.gif"
    width="121" height="23" border="0" usemap="#m_tab4 " alt=""></td><td><img
    name="tab5" src="../images/tab5.gif" width="139" height="23" border="0"
    usemap="#m_tab5 " alt=""></td></tr></table></td></tr><tr><td><tab le
    border="0" cellpadding="0" cellspacing="0" width="708"><tr ><td><img
    name="tab6" src="../images/tab6.gif" width="100" height="4" border="0"
    usemap="#m_tab6 " alt=""></td><td><img name="tab7" src="../images/tab7.gif"
    width="50" height="4" border="0" usemap="#m_tab7 " alt=""></td><td><img
    name="kle_r10_c 11" src="../images/kle_r10_c11.gif " width="45" height="4"
    border="0" usemap="#m_kle_ r10_c11" alt=""></td><td><img name="tab8"
    src="../images/tab8.gif" width="84" height="4" border="0" usemap="#m_tab8 "
    alt=""></td><td><img name="kle_r10_c 13" src="../images/kle_r10_c13.gif "
    width="46" height="4" border="0" usemap="#m_kle_ r10_c13"
    alt=""></td><td><img name="tab9" src="../images/tab9.gif" width="93"
    height="4" border="0" usemap="#m_tab9 " alt=""></td><td><img name="tab10"
    src="../images/tab10.gif" width="30" height="4" border="0" usemap="#m_tab1 0"
    alt=""></td><td><img name="kle_r10_c 16" src="../images/kle_r10_c16.gif "
    width="115" height="4" border="0" usemap="#m_kle_ r10_c16"
    alt=""></td><td><img name="tab11" src="../images/tab11.gif" width="6"
    height="4" border="0" usemap="#m_tab1 1" alt=""></td><td><img
    name="kle_r10_c 20" src="../images/kle_r10_c20.gif " width="139" height="4"
    border="0" usemap="#m_kle_ r10_c20"
    alt=""></td></tr></table></td></tr><tr><td><tab le border="0" cellpadding="0"
    cellspacing="0" width="708"><tr ><td><img name="kle_r12_c 4"
    src="../images/kle_r12_c4.gif" width="100" height="23" border="0"
    usemap="#m_kle_ r12_c4" alt=""></td><td><img name="kle_r12_c 10"
    src="../images/kle_r12_c10.gif " width="95" height="23" border="0"
    usemap="#m_kle_ r12_c10" alt=""></td><td><img name="kle_r12_c 12"
    src="../images/kle_r12_c12.gif " width="130" height="23" border="0"
    usemap="#m_kle_ r12_c12" alt=""></td><td><img name="kle_r12_c 14"
    src="../images/kle_r12_c14.gif " width="93" height="23" border="0"
    usemap="#m_kle_ r12_c14" alt=""></td><td><img name="kle_r12_c 15"
    src="../images/kle_r12_c15.gif " width="145" height="23" border="0"
    usemap="#m_kle_ r12_c15" alt=""></td><td><img name="kle_r12_c 19"
    src="../images/kle_r12_c19.gif " width="145" height="23" border="0"
    usemap="#m_kle_ r12_c19" alt=""></td></tr></table></td></tr></table>


    Any help or direction of how to cache images using an image map would be
    greatly appreciated.

    TIA

    Dave



  • Jeff Thies

    #2
    Re: rollovers not preloading images, why?

    [color=blue]
    > Hi,
    >
    > I have an app that uses rollover images, but the images are still pulled
    > from the web server during a mouseover instead of being pulled from[/color]
    memory.[color=blue]
    > The code is as follows:[/color]

    Sheesh.

    Try to provide the simplest example that demonstrates the problem. Who
    wants to go through all that?

    <snip Dreamweaver crap)

    [color=blue]
    > tab1_f2 = new Image(150 ,23); tab1_f2.src = "images/tab1_f2.gif";[/color]

    the path here is relative to the current directory


    ('le_r2_c10','' ,'../images3/le_r2_c10_f2.gi f',1);">

    That path here is absolute to the root.

    Where are the images and where is the page? Could that be your "problem"?

    Jeff
    [color=blue]
    > <area shape="RECT" coords="0,-23,115,29" href="http://kieslerle/cart.aspx"
    > alt="Click Here to view Shopping Cart"
    > onMouseOut="MM_ swapImage('le_r 2_c10','','../images3/le_r2_c10.gif', 1);"
    >[/color]
    onMouseOver="MM _swapImage('le_ r2_c10','','../images3/le_r2_c10_f2.gi f',1);">[color=blue]
    > <area shape="RECT" coords="-109,-23,6,29"[/color]
    href="http://kieslerle/cart.aspx"[color=blue]
    > alt="Click Here to view Shopping Cart"
    > onMouseOut="MM_ swapImage('le_r 2_c10','','../images3/le_r2_c10.gif', 1);"
    >[/color]
    onMouseOver="MM _swapImage('le_ r2_c10','','../images3/le_r2_c10_f2.gi f',1);">[color=blue]
    > <area shape="RECT" coords="0,-36,115,16" href="http://kieslerle/cart.aspx"
    > alt="Click Here to view Shopping Cart"
    > onMouseOut="MM_ swapImage('le_r 2_c10','','../images3/le_r2_c10.gif', 1);"
    >[/color]
    onMouseOver="MM _swapImage('le_ r2_c10','','../images3/le_r2_c10_f2.gi f',1);">[color=blue]
    >
    > <area shape="RECT" coords="-109,-36,6,16"[/color]
    href="http://kieslerle/cart.aspx"[color=blue]
    > alt="Click Here to view Shopping Cart"
    > onMouseOut="MM_ swapImage('le_r 2_c10','','../images3/le_r2_c10.gif', 1);"
    >[/color]
    onMouseOver="MM _swapImage('le_ r2_c10','','../images3/le_r2_c10_f2.gi f',1);">[color=blue]
    > <area shape="RECT" coords="0,-49,115,3" href="http://kieslerle/cart.aspx"
    > alt="Click Here to view Shopping Cart"
    > onMouseOut="MM_ swapImage('le_r 2_c10','','../images3/le_r2_c10.gif', 1);"
    >[/color]
    onMouseOver="MM _swapImage('le_ r2_c10','','../images3/le_r2_c10_f2.gi f',1);">[color=blue]
    > </map><map name="m_tab1">< area shape="rect" coords="7,1,142 ,23"
    > href="http://kieslerle/category.aspx?T ABID=1" alt="Weapons & Ammunition"
    >[/color]
    onMouseOut="MM_ swapImage('tab1 ','','../images/tab1.gif','tab6 ','','../images[color=blue]
    > /tab6.gif','tab7 ','','../images/tab7.gif',1);"
    >[/color]
    onMouseOver="MM _swapImage('tab 1','','../images/tab1_f2.gif','t ab6','','../im[color=blue]
    > ages/tab6_f2.gif','t ab7','','../images/tab7_f2.gif',1) ;" ></map><map
    > name="m_tab2">< area shape="rect" coords="7,1,122 ,23"
    > href="http://kieslerle/category.aspx?T ABID=2" alt="Weapon Accessories"
    >[/color]
    onMouseOut="MM_ swapImage('tab2 ','','../images/tab2.gif','kle_ r10_c11','','..[color=blue]
    > /images/kle_r10_c11.gif ','tab8','','../images/tab8.gif',1);"
    >[/color]
    onMouseOver="MM _swapImage('tab 2','','../images/tab2_f3.gif','k le_r10_c11',''[color=blue]
    > ,'../images/kle_r10_c11_f3. gif','tab8','', '../images/tab8_f3.gif',1) ;"[color=green]
    > ></map><map name="m_tab3">< area shape="rect" coords="7,1,162 ,23"[/color]
    > href="http://kieslerle/category.aspx?T ABID=3" alt="Shields, Armor &
    > Protection"
    >[/color]
    onMouseOut="MM_ swapImage('tab3 ','','../images/tab3.gif','kle_ r10_c13','','..[color=blue]
    >[/color]
    /images/kle_r10_c13.gif ','tab9','','../images/tab9.gif','tab1 0','','../image[color=blue]
    > s/tab10.gif',1);"
    >[/color]
    onMouseOver="MM _swapImage('tab 3','','../images/tab3_f4.gif','k le_r10_c13',''[color=blue]
    >[/color]
    ,'../images/kle_r10_c13_f4. gif','tab9','', '../images/tab9_f4.gif','t ab10',''[color=blue]
    > ,'../images/tab10_f4.gif',1 );" ></map><map name="m_tab4">< area[/color]
    shape="rect"[color=blue]
    > coords="7,1,115 ,23" href="http://kieslerle/category.aspx?T ABID=4"
    > alt="Training & Survival"
    >[/color]
    onMouseOut="MM_ swapImage('tab4 ','','../images/tab4.gif','kle_ r10_c16','','..[color=blue]
    > /images/kle_r10_c16.gif ','tab11','','. ./images/tab11.gif',1);"
    >[/color]
    onMouseOver="MM _swapImage('tab 4','','../images/tab4_f5.gif','k le_r10_c16',''[color=blue]
    > ,'../images/kle_r10_c16_f5. gif','tab11','' ,'../images/tab11_f5.gif',1 );"[color=green]
    > ></map><map name="m_tab5">< area shape="rect" coords="6,1,133 ,23"[/color]
    > href="http://kieslerle/category.aspx?T ABID=5" alt="Optics, Lights &[/color]
    Vision"[color=blue]
    >[/color]
    onMouseOut="MM_ swapImage('tab5 ','','../images/tab5.gif','kle_ r10_c20','','..[color=blue]
    > /images/kle_r10_c20.gif ',1);"
    >[/color]
    onMouseOver="MM _swapImage('tab 5','','../images/tab5_f6.gif','k le_r10_c20',''[color=blue]
    > ,'../images/kle_r10_c20_f6. gif',1);" ></map><map name="m_tab6">< area
    > shape="rect" coords="6,3,94, 26"
    > href="http://kieslerle/category.aspx?T ABID=6" alt="Tactical & Duty"
    >[/color]
    onMouseOut="MM_ swapImage('tab6 ','','../images/tab6.gif','kle_ r12_c4','','../[color=blue]
    > images/kle_r12_c4.gif' ,1);"
    >[/color]
    onMouseOver="MM _swapImage('tab 6','','../images/tab6_f7.gif','k le_r12_c4','',[color=blue]
    > '../images/kle_r12_c4_f7.g if',1);" ></map><map name="m_kle_r12 _c4"><area
    > shape="rect" coords="6,-1,94,22"
    > href="http://kieslerle/category.aspx?T ABID=6" alt="Tactical & Duty"
    >[/color]
    onMouseOut="MM_ swapImage('tab6 ','','../images/tab6.gif','kle_ r12_c4','','../[color=blue]
    > images/kle_r12_c4.gif' ,1);"
    >[/color]
    onMouseOver="MM _swapImage('tab 6','','../images/tab6_f7.gif','k le_r12_c4','',[color=blue]
    > '../images/kle_r12_c4_f7.g if',1);" ></map><map name="m_tab7">< area
    > shape="rect" coords="6,3,89, 26"
    > href="http://kieslerle/category.aspx?T ABID=7" alt="Knives & Tools"
    >[/color]
    onMouseOut="MM_ swapImage('tab7 ','','../images/tab7.gif','kle_ r10_c11','','..[color=blue]
    > /images/kle_r10_c11.gif ','kle_r12_c10' ,'','../images/kle_r12_c10.gif ',1);"
    >[/color]
    onMouseOver="MM _swapImage('tab 7','','../images/tab7_f8.gif','k le_r10_c11',''[color=blue]
    >[/color]
    ,'../images/kle_r10_c11_f8. gif','kle_r12_c 10','','../images/kle_r12_c10_f8. g[color=blue]
    > if',1);" ></map><map name="m_kle_r10 _c11"><area shape="rect"
    > coords="-44,3,39,26" href="http://kieslerle/category.aspx?T ABID=7"
    > alt="Knives & Tools"
    >[/color]
    onMouseOut="MM_ swapImage('tab7 ','','../images/tab7.gif','kle_ r10_c11','','..[color=blue]
    > /images/kle_r10_c11.gif ','kle_r12_c10' ,'','../images/kle_r12_c10.gif ',1);"
    >[/color]
    onMouseOver="MM _swapImage('tab 7','','../images/tab7_f8.gif','k le_r10_c11',''[color=blue]
    >[/color]
    ,'../images/kle_r10_c11_f8. gif','kle_r12_c 10','','../images/kle_r12_c10_f8. g[color=blue]
    > if',1);" ></map><map name="m_kle_r12 _c10"><area shape="rect"
    > coords="6,-1,89,22" href="http://kieslerle/category.aspx?T ABID=7"
    > alt="Knives & Tools"
    >[/color]
    onMouseOut="MM_ swapImage('tab7 ','','../images/tab7.gif','kle_ r10_c11','','..[color=blue]
    > /images/kle_r10_c11.gif ','kle_r12_c10' ,'','../images/kle_r12_c10.gif ',1);"
    >[/color]
    onMouseOver="MM _swapImage('tab 7','','../images/tab7_f8.gif','k le_r10_c11',''[color=blue]
    >[/color]
    ,'../images/kle_r10_c11_f8. gif','kle_r12_c 10','','../images/kle_r12_c10_f8. g[color=blue]
    > if',1);" ></map><map name="m_tab8">< area shape="rect" coords="6,3,125 ,26"
    > href="http://kieslerle/category.aspx?T ABID=8" alt="Specialty Equipment"
    >[/color]
    onMouseOut="MM_ swapImage('tab8 ','','../images/tab8.gif','kle_ r10_c13','','..[color=blue]
    > /images/kle_r10_c13.gif ','kle_r12_c12' ,'','../images/kle_r12_c12.gif ',1);"
    >[/color]
    onMouseOver="MM _swapImage('tab 8','','../images/tab8_f9.gif','k le_r10_c13',''[color=blue]
    >[/color]
    ,'../images/kle_r10_c13_f9. gif','kle_r12_c 12','','../images/kle_r12_c12_f9. g[color=blue]
    > if',1);" ></map><map name="m_kle_r10 _c13"><area shape="rect"
    > coords="-78,3,41,26" href="http://kieslerle/category.aspx?T ABID=8"
    > alt="Specialty Equipment"
    >[/color]
    onMouseOut="MM_ swapImage('tab8 ','','../images/tab8.gif','kle_ r10_c13','','..[color=blue]
    > /images/kle_r10_c13.gif ','kle_r12_c12' ,'','../images/kle_r12_c12.gif ',1);"
    >[/color]
    onMouseOver="MM _swapImage('tab 8','','../images/tab8_f9.gif','k le_r10_c13',''[color=blue]
    >[/color]
    ,'../images/kle_r10_c13_f9. gif','kle_r12_c 12','','../images/kle_r12_c12_f9. g[color=blue]
    > if',1);" ></map><map name="m_kle_r12 _c12"><area shape="rect"
    > coords="6,-1,125,22" href="http://kieslerle/category.aspx?T ABID=8"
    > alt="Specialty Equipment"
    >[/color]
    onMouseOut="MM_ swapImage('tab8 ','','../images/tab8.gif','kle_ r10_c13','','..[color=blue]
    > /images/kle_r10_c13.gif ','kle_r12_c12' ,'','../images/kle_r12_c12.gif ',1);"
    >[/color]
    onMouseOver="MM _swapImage('tab 8','','../images/tab8_f9.gif','k le_r10_c13',''[color=blue]
    >[/color]
    ,'../images/kle_r10_c13_f9. gif','kle_r12_c 12','','../images/kle_r12_c12_f9. g[color=blue]
    > if',1);" ></map><map name="m_tab9">< area shape="rect" coords="6,3,87, 26"
    > href="http://kieslerle/category.aspx?T ABID=9" alt="Miscellane ous"
    >[/color]
    onMouseOut="MM_ swapImage('tab9 ','','../images/tab9.gif','kle_ r12_c14','','..[color=blue]
    > /images/kle_r12_c14.gif ',1);"
    >[/color]
    onMouseOver="MM _swapImage('tab 9','','../images/tab9_f10.gif',' kle_r12_c14','[color=blue]
    > ','../images/kle_r12_c14_f10 .gif',1);" ></map><map
    > name="m_kle_r12 _c14"><area shape="rect" coords="6,-1,87,22"
    > href="http://kieslerle/category.aspx?T ABID=9" alt="Miscellane ous"
    >[/color]
    onMouseOut="MM_ swapImage('tab9 ','','../images/tab9.gif','kle_ r12_c14','','..[color=blue]
    > /images/kle_r12_c14.gif ',1);"
    >[/color]
    onMouseOver="MM _swapImage('tab 9','','../images/tab9_f10.gif',' kle_r12_c14','[color=blue]
    > ','../images/kle_r12_c14_f10 .gif',1);" ></map><map name="m_tab10"> <area
    > shape="rect" coords="6,3,138 ,26"
    > href="http://kieslerle/category.aspx?T ABID=10" alt="Government & Military"
    >[/color]
    onMouseOut="MM_ swapImage('tab1 0','','../images/tab10.gif','kle _r10_c16','','[color=blue]
    >[/color]
    .../images/kle_r10_c16.gif ','kle_r12_c15' ,'','../images/kle_r12_c15.gif ',1);"[color=blue]
    >[/color]
    onMouseOver="MM _swapImage('tab 10','','../images/tab10_f11.gif', 'kle_r10_c16'[color=blue]
    >[/color]
    ,'','../images/kle_r10_c16_f11 .gif','kle_r12_ c15','','../images/kle_r12_c15_[color=blue]
    > f11.gif',1);" ></map><map name="m_kle_r10 _c16"><area shape="rect"
    > coords="-24,3,108,26" href="http://kieslerle/category.aspx?T ABID=10"
    > alt="Government & Military"
    >[/color]
    onMouseOut="MM_ swapImage('tab1 0','','../images/tab10.gif','kle _r10_c16','','[color=blue]
    >[/color]
    .../images/kle_r10_c16.gif ','kle_r12_c15' ,'','../images/kle_r12_c15.gif ',1);"[color=blue]
    >[/color]
    onMouseOver="MM _swapImage('tab 10','','../images/tab10_f11.gif', 'kle_r10_c16'[color=blue]
    >[/color]
    ,'','../images/kle_r10_c16_f11 .gif','kle_r12_ c15','','../images/kle_r12_c15_[color=blue]
    > f11.gif',1);" ></map><map name="m_kle_r12 _c15"><area shape="rect"
    > coords="6,-1,138,22" href="http://kieslerle/category.aspx?T ABID=10"
    > alt="Government & Military"
    >[/color]
    onMouseOut="MM_ swapImage('tab1 0','','../images/tab10.gif','kle _r10_c16','','[color=blue]
    >[/color]
    .../images/kle_r10_c16.gif ','kle_r12_c15' ,'','../images/kle_r12_c15.gif ',1);"[color=blue]
    >[/color]
    onMouseOver="MM _swapImage('tab 10','','../images/tab10_f11.gif', 'kle_r10_c16'[color=blue]
    >[/color]
    ,'','../images/kle_r10_c16_f11 .gif','kle_r12_ c15','','../images/kle_r12_c15_[color=blue]
    > f11.gif',1);" ></map><map name="m_tab11"> <area shape="rect"
    > coords="5,3,139 ,26" href="http://kieslerle/business.aspx?T ABID=11"
    > alt="Doing Business With Kieslers"
    >[/color]
    onMouseOut="MM_ swapImage('tab1 1','','../images/tab11.gif','kle _r10_c20','','[color=blue]
    >[/color]
    .../images/kle_r10_c20.gif ','kle_r12_c19' ,'','../images/kle_r12_c19.gif ',1);"[color=blue]
    >[/color]
    onMouseOver="MM _swapImage('tab 11','','../images/tab11_f12.gif', 'kle_r10_c20'[color=blue]
    >[/color]
    ,'','../images/kle_r10_c20_f12 .gif','kle_r12_ c19','','../images/kle_r12_c19_[color=blue]
    > f12.gif',1);" ></map><map name="m_kle_r10 _c20"><area shape="rect"
    > coords="-1,3,133,26" href="http://kieslerle/business.aspx?T ABID=11"
    > alt="Doing Business With Kieslers"
    >[/color]
    onMouseOut="MM_ swapImage('tab1 1','','../images/tab11.gif','kle _r10_c20','','[color=blue]
    >[/color]
    .../images/kle_r10_c20.gif ','kle_r12_c19' ,'','../images/kle_r12_c19.gif ',1);"[color=blue]
    >[/color]
    onMouseOver="MM _swapImage('tab 11','','../images/tab11_f12.gif', 'kle_r10_c20'[color=blue]
    >[/color]
    ,'','../images/kle_r10_c20_f12 .gif','kle_r12_ c19','','../images/kle_r12_c19_[color=blue]
    > f12.gif',1);" ></map><map name="m_kle_r12 _c19"><area shape="rect"
    > coords="5,-1,139,22" href="http://kieslerle/business.aspx?T ABID=11"
    > alt="Doing Business With Kieslers"
    >[/color]
    onMouseOut="MM_ swapImage('tab1 1','','../images/tab11.gif','kle _r10_c20','','[color=blue]
    >[/color]
    .../images/kle_r10_c20.gif ','kle_r12_c19' ,'','../images/kle_r12_c19.gif ',1);"[color=blue]
    >[/color]
    onMouseOver="MM _swapImage('tab 11','','../images/tab11_f12.gif', 'kle_r10_c20'[color=blue]
    >[/color]
    ,'','../images/kle_r10_c20_f12 .gif','kle_r12_ c19','','../images/kle_r12_c19_[color=blue]
    > f12.gif',1);" ></map>
    >
    >
    >
    > THE TABLE CONTAINING THE IMAGES THAT ROLLOVER:
    >
    > <table border="0" cellpadding="0" cellspacing="0"[/color]
    width="708"><tr ><td><table[color=blue]
    > border="0" cellpadding="0" cellspacing="0" width="708"><tr ><td><img
    > name="tab1" src="../images/tab1.gif" width="150" height="23" border="0"
    > usemap="#m_tab1 " alt=""></td><td><img name="tab2" src="../images/tab2.gif"
    > width="129" height="23" border="0" usemap="#m_tab2 " alt=""></td><td><img
    > name="tab3" src="../images/tab3.gif" width="169" height="23" border="0"
    > usemap="#m_tab3 " alt=""></td><td><img name="tab4" src="../images/tab4.gif"
    > width="121" height="23" border="0" usemap="#m_tab4 " alt=""></td><td><img
    > name="tab5" src="../images/tab5.gif" width="139" height="23" border="0"
    > usemap="#m_tab5 " alt=""></td></tr></table></td></tr><tr><td><tab le
    > border="0" cellpadding="0" cellspacing="0" width="708"><tr ><td><img
    > name="tab6" src="../images/tab6.gif" width="100" height="4" border="0"
    > usemap="#m_tab6 " alt=""></td><td><img name="tab7" src="../images/tab7.gif"
    > width="50" height="4" border="0" usemap="#m_tab7 " alt=""></td><td><img
    > name="kle_r10_c 11" src="../images/kle_r10_c11.gif " width="45" height="4"
    > border="0" usemap="#m_kle_ r10_c11" alt=""></td><td><img name="tab8"
    > src="../images/tab8.gif" width="84" height="4" border="0" usemap="#m_tab8 "
    > alt=""></td><td><img name="kle_r10_c 13" src="../images/kle_r10_c13.gif "
    > width="46" height="4" border="0" usemap="#m_kle_ r10_c13"
    > alt=""></td><td><img name="tab9" src="../images/tab9.gif" width="93"
    > height="4" border="0" usemap="#m_tab9 " alt=""></td><td><img name="tab10"
    > src="../images/tab10.gif" width="30" height="4" border="0"[/color]
    usemap="#m_tab1 0"[color=blue]
    > alt=""></td><td><img name="kle_r10_c 16" src="../images/kle_r10_c16.gif "
    > width="115" height="4" border="0" usemap="#m_kle_ r10_c16"
    > alt=""></td><td><img name="tab11" src="../images/tab11.gif" width="6"
    > height="4" border="0" usemap="#m_tab1 1" alt=""></td><td><img
    > name="kle_r10_c 20" src="../images/kle_r10_c20.gif " width="139" height="4"
    > border="0" usemap="#m_kle_ r10_c20"
    > alt=""></td></tr></table></td></tr><tr><td><tab le border="0"[/color]
    cellpadding="0"[color=blue]
    > cellspacing="0" width="708"><tr ><td><img name="kle_r12_c 4"
    > src="../images/kle_r12_c4.gif" width="100" height="23" border="0"
    > usemap="#m_kle_ r12_c4" alt=""></td><td><img name="kle_r12_c 10"
    > src="../images/kle_r12_c10.gif " width="95" height="23" border="0"
    > usemap="#m_kle_ r12_c10" alt=""></td><td><img name="kle_r12_c 12"
    > src="../images/kle_r12_c12.gif " width="130" height="23" border="0"
    > usemap="#m_kle_ r12_c12" alt=""></td><td><img name="kle_r12_c 14"
    > src="../images/kle_r12_c14.gif " width="93" height="23" border="0"
    > usemap="#m_kle_ r12_c14" alt=""></td><td><img name="kle_r12_c 15"
    > src="../images/kle_r12_c15.gif " width="145" height="23" border="0"
    > usemap="#m_kle_ r12_c15" alt=""></td><td><img name="kle_r12_c 19"
    > src="../images/kle_r12_c19.gif " width="145" height="23" border="0"
    > usemap="#m_kle_ r12_c19" alt=""></td></tr></table></td></tr></table>
    >
    >
    > Any help or direction of how to cache images using an image map would be
    > greatly appreciated.
    >
    > TIA
    >
    > Dave
    >
    >
    >[/color]


    Comment

    • Dave

      #3
      Re: rollovers not preloading images, why?

      Hi Jeff,
      Sorry about the mess. I put together a simple example (autogenerated with
      Fireworks). Basically, instead of using a simple rollover, it uses a an
      image map for each tab/button.

      go to http://www.miraclecat.com/test/rollover.htm for a simple 2 button
      example (using an image map)
      http://www.miraclecat.com/test/rollover2.htm for the same example without
      the image map.

      rollover.htm:
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

      <html>
      <head>
      <title>Untitled </title>
      </head>

      <body>
      <script language="JavaS cript">
      <!-- hide
      function MM_findObj(n, d) { //v4.01
      var p,i,x; if(!d) d=document;
      if((p=n.indexOf ("?"))>0&&paren t.frames.length ) {
      d=parent.frames[n.substring(p+1 )].document; n=n.substring(0 ,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.fo rms.length;i++)
      x=d.forms[i][n];
      for(i=0;!x&&d.l ayers&&i<d.laye rs.length;i++)
      x=MM_findObj(n, d.layers[i].document);
      if(!x && d.getElementByI d) x=d.getElementB yId(n); return x;
      }

      function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_sw apImage.argumen ts; document.MM_sr= new Array;
      for(i=0;i<(a.le ngth-2);i+=3)
      if ((x=MM_findObj( a[i]))!=null){docum ent.MM_sr[j++]=x; if(!x.oSrc)
      x.oSrc=x.src; x.src=a[i+2];}
      }

      if (document.image s) {
      test_r2_c2_f2 = new Image(75 ,31); test_r2_c2_f2.s rc =
      "images/test_r2_c2_f2.g if";
      test_r2_c2_f1 = new Image(75 ,31); test_r2_c2_f1.s rc =
      "images/test_r2_c2.gif" ;
      test_r2_c4_f2 = new Image(75 ,31); test_r2_c4_f2.s rc =
      "images/test_r2_c4_f2.g if";
      test_r2_c4_f1 = new Image(75 ,31); test_r2_c4_f1.s rc =
      "images/test_r2_c4.gif" ;
      }
      // stop hiding -->
      </script>
      <table border="0" cellpadding="0" cellspacing="0" width="200">
      <tr>
      <td colspan="5"><im g name="test_r1_c 1" src="images/test_r1_c1.gif"
      width="200" height="50" border="0" alt=""></td>
      </tr>
      <tr>
      <td rowspan="2"><im g name="test_r2_c 1" src="images/test_r2_c1.gif"
      width="12" height="150" border="0" alt=""></td>
      <td><img name="test_r2_c 2" src="images/test_r2_c2.gif" width="75"
      height="31" border="0" usemap="#m_test _r2_c2" alt=""></td>
      <td rowspan="2"><im g name="test_r2_c 3" src="images/test_r2_c3.gif"
      width="21" height="150" border="0" alt=""></td>
      <td><img name="test_r2_c 4" src="images/test_r2_c4.gif" width="75"
      height="31" border="0" usemap="#m_test _r2_c4" alt=""></td>
      <td rowspan="2"><im g name="test_r2_c 5" src="images/test_r2_c5.gif"
      width="17" height="150" border="0" alt=""></td>
      </tr>
      <tr>
      <td><img name="test_r3_c 2" src="images/test_r3_c2.gif" width="75"
      height="119" border="0" alt=""></td>
      <td><img name="test_r3_c 4" src="images/test_r3_c4.gif" width="75"
      height="119" border="0" alt=""></td>
      </tr>
      <map name="m_test_r2 _c2">
      <area shape="rect" coords="18,9,53 ,22" href="#" title="" alt=""
      onMouseOut="MM_ swapImage('test _r2_c2','','ima ges/test_r2_c2.gif' ,1);"
      onMouseOver="MM _swapImage('tes t_r2_c2','','im ages/test_r2_c2_f2.g if',1);" >
      </map>
      <map name="m_test_r2 _c4">
      <area shape="rect" coords="18,10,5 4,22" href="#" title="" alt=""
      onMouseOut="MM_ swapImage('test _r2_c4','','ima ges/test_r2_c4.gif' ,1);"
      onMouseOver="MM _swapImage('tes t_r2_c4','','im ages/test_r2_c4_f2.g if',1);" >
      </map>
      </table>


      </body>
      </html>



      rollover2.htm (no image map):
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

      <html>
      <head>
      <title>Untitled </title>
      </head>

      <body>


      <script language="JavaS cript">
      <!-- hide
      function MM_findObj(n, d) { //v4.01
      var p,i,x; if(!d) d=document;
      if((p=n.indexOf ("?"))>0&&paren t.frames.length ) {
      d=parent.frames[n.substring(p+1 )].document; n=n.substring(0 ,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.fo rms.length;i++)
      x=d.forms[i][n];
      for(i=0;!x&&d.l ayers&&i<d.laye rs.length;i++)
      x=MM_findObj(n, d.layers[i].document);
      if(!x && d.getElementByI d) x=d.getElementB yId(n); return x;
      }

      function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_sw apImage.argumen ts; document.MM_sr= new Array;
      for(i=0;i<(a.le ngth-2);i+=3)
      if ((x=MM_findObj( a[i]))!=null){docum ent.MM_sr[j++]=x; if(!x.oSrc)
      x.oSrc=x.src; x.src=a[i+2];}
      }
      function MM_swapImgResto re() { //v3.0
      var i,x,a=document. MM_sr; for(i=0;a&&i<a. length&&(x=a[i])&&x.oSrc;i++ )
      x.src=x.oSrc;
      }

      if (document.image s) {
      test2_r2_c2_f2 = new Image(75 ,31); test2_r2_c2_f2. src =
      "images/test2_r2_c2_f2. gif";
      test2_r2_c2_f1 = new Image(75 ,31); test2_r2_c2_f1. src =
      "images/test2_r2_c2.gif ";
      test2_r2_c4_f2 = new Image(75 ,31); test2_r2_c4_f2. src =
      "images/test2_r2_c4_f2. gif";
      test2_r2_c4_f1 = new Image(75 ,31); test2_r2_c4_f1. src =
      "images/test2_r2_c4.gif ";
      }
      // stop hiding -->
      </script>

      <table border="0" cellpadding="0" cellspacing="0" width="200">
      <tr>
      <td colspan="5"><im g name="test2_r1_ c1" src="images/test2_r1_c1.gif "
      width="200" height="50" border="0" alt=""></td>
      </tr>
      <tr>
      <td rowspan="2"><im g name="test2_r2_ c1" src="images/test2_r2_c1.gif "
      width="12" height="150" border="0" alt=""></td>
      <td><a href="#" onMouseOut="MM_ swapImgRestore( );"
      onMouseOver="MM _swapImage('tes t2_r2_c2','','i mages/test2_r2_c2_f2. gif',1);">
      <img name="test2_r2_ c2" src="images/test2_r2_c2.gif " width="75" height="31"
      border="0" alt=""></a></td>
      <td rowspan="2"><im g name="test2_r2_ c3" src="images/test2_r2_c3.gif "
      width="21" height="150" border="0" alt=""></td>
      <td><a href="#" onMouseOut="MM_ swapImgRestore( );"
      onMouseOver="MM _swapImage('tes t2_r2_c4','','i mages/test2_r2_c4_f2. gif',1);">
      <img name="test2_r2_ c4" src="images/test2_r2_c4.gif " width="75" height="31"
      border="0" alt=""></a></td>
      <td rowspan="2"><im g name="test2_r2_ c5" src="images/test2_r2_c5.gif "
      width="17" height="150" border="0" alt=""></td>
      </tr>
      <tr>
      <td><img name="test2_r3_ c2" src="images/test2_r3_c2.gif " width="75"
      height="119" border="0" alt=""></td>
      <td><img name="test2_r3_ c4" src="images/test2_r3_c4.gif " width="75"
      height="119" border="0" alt=""></td>
      </tr>
      </table>

      </body>
      </html>


      TIA

      Dave





      Comment

      • Dr John Stockton

        #4
        Re: rollovers not preloading images, why?

        JRS: In article <UxZxc.4790$Y3. 1193@newsread2. news.atl.earthl ink.net>,
        seen in news:comp.lang. javascript, Jeff Thies <nospam@nospam. net> posted
        at Thu, 10 Jun 2004 13:41:08 :
        [color=blue]
        >Lines: 323[/color]

        [color=blue]
        > Try to provide the simplest example that demonstrates the problem. Who
        >wants to go through all that?[/color]

        Not I.
        [color=blue]
        ><snip Dreamweaver crap)[/color]
        [color=blue]
        > ...[/color]
        [color=blue]
        >Where are the images and where is the page? Could that be your "problem"?
        >
        > Jeff[/color]

        So why did you then quote all the rest of it?

        --
        © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 MIME ©
        Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
        Web <URL:http://www.merlyn.demo n.co.uk/news-use.htm> : about usage of News.
        No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.

        Comment

        Working...