#1 (permalink)  
Old 03-12-2005, 04:25 AM
Registered User
 
Join Date: Mar 2005
Posts: 2
Question IE 6 Strange, strange problem

Hi gurus,

I'm writing a php/js function to build shrink and hide divs when you click on things;

here is the PHP;

//Show/Hide Function (builds +/- icon)
function sh($tid,$isshown,$txt)
{
if($isshown==1)
{
echo "<table width='100%' border='0' cellspacing='0' cellpadding='3'><tr><td align='left' valign='middle' id='upd$tid'><a href='javascript://' onClick=\"bupdd('upd$tid','1','$tid','$txt'); hide('$tid');\" title='Hide' tabindex='-1' class='sh'><img src='images/icons/tiny/minus.gif' border='0' id='img$tid'>&nbsp;$txt</a></td></tr></table>";
}
else
{
echo "<table width='100%' border='0' cellspacing='0' cellpadding='3'><tr><td align='left' valign='middle' id='upd$tid'><a href='javascript://' onClick=\"bupdd('upd$tid','0','$tid','$txt'); show('$tid');\" title='Show' tabindex='-1' class='sh'><img src='images/icons/tiny/plus.gif' border='0' id='img$tid'>&nbsp;$txt</a></td></tr></table>";
}
}

Here is the JS that it calls;
//Function to build the graphic for the up/down icon of the build table
function bupdd(the_div, the_state, table_div,txt)
{
if(the_state==0)
{
//alert('building hide div');
html="<a href='javascript://' onClick=\"clearIt('"+table_div+"'); bupdd('"+the_div+"','1','"+table_div+"','"+txt+"') ;\" title='Hide' class='sh'><img src='<?php echo $GLOBALS[site_url] ?>images/icons/tiny/minus.gif' border='0'>&nbsp;"+txt+"</a>";
document.all[the_div].innerHTML=html;
}
else
{
//alert('building show div');
document.all[the_div].innerHTML="<a href='javascript://' onClick=\"show('"+table_div+"'); bupdd('"+the_div+"','0','"+table_div+"','"+txt+"') ;\" title='Show' class='sh'><img src='<?php echo $GLOBALS[site_url] ?>images/icons/tiny/plus.gif' border='0'>&nbsp;"+txt+"</a>";
}
}

I also preload both those images;

Here is my problem;

IE 6.0 on my LAN development server the image swaps out no problem whether or not you click on the the text or the icon to shrink or hide (both inside same href)

IE 6.0 on my www publishing server, the icon only changes if you click on the icon to shrink or hide, not the text.

Firefox works no matter what you click on, regardless of domain.

I'm at a bit of a loss..... Is it that IE loads images differently then firefox when doing innerHTML calls or is it just that IE has some issues???

Any ideas?

Thanks
Sn0rcha

Last edited by sn0rcha; 03-12-2005 at 04:27 AM.
Reply With Quote

  #2 (permalink)  
Old 03-12-2005, 04:51 AM
Registered User
 
Join Date: Mar 2005
Posts: 2
OK I fixed my own problem,

It was that IIS on the production server was set to "Content:Expire Immediatley" - as soon as I set that to back to normal.. it worked..

I must admit though that is one seriously strange problem.
Reply With Quote
Reply


Thread Tools
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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -5. The time now is 04:36 PM.

 
Bitrix
Clicky Web Analytics
CloudContacts
Maxtango


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter