navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Free FrontPage Templates

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Simple Rollovers not working on Link to Self.

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> Simple Rollovers not working on Link to Self.
Page: [1]
 
larrytoelle

 

Posts: 12
Joined: 2/25/2005
Status: offline

 
Simple Rollovers not working on Link to Self. - 2/25/2005 18:42:21   
Howdy,

My first post here ... so ... "howdy" to everyone.

I'm sure this is a "dumb" question ... but ...

IE6 only problem ----- NS et al seem ok ...

When the attached program initially loads ... everything is fine. When one of the buttons are pushed ... and the program reloads via <A>nchor ... on each subsequent mouseover and mouseout ... the server is called to reload the image. If the page is "refreshed" ... then everything returns to fine.

I find this behavior a bit odd ... don't you?

This is a PHP file page .. but ... with no php code.

You can test at: http://www.nocache.onlineheli.com/cgi/test.php

Code below ...

Any pointers you could share would be greatly appreciated ...

Thanks,

LT

<html>
<head>
<title></title>
<style>
.tabup {display: block; width:100px; height:21px; padding-top: 4px; background-image: url(images/buttons/BlueTab.gif); text-decoration: none; font-size:11px; font-family:arial; font-weight:bold; color: #000099}
.tabover {display: block; width:100px; height:21px; padding-top: 4px; background-image: url(images/buttons/RedTab.gif); text-decoration: none; font-size:11px; font-family:arial; font-weight:bold; color: #000000}
</style>
</head>
<body>
<a class="tabup" onMouseOver="this.className='tabover';" onMouseOut="this.className='tabup';" href="test.php">Home</a>
<a class="tabup" onMouseOver="this.className='tabover';" onMouseOut="this.className='tabup';" href="test.php">About</a>
<a class="tabup" onMouseOver="this.className='tabover';" onMouseOut="this.className='tabup';" href="test.php">Contact</a>
<a class="tabup" onMouseOver="this.className='tabover';"onMouseOut="this.className='tabup';" href="test.php">Login</a>
</body>
</html>
dpf

 

Posts: 7126
Joined: 11/12/2003
From: India-napolis
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/25/2005 19:08:25   
quote:

the server is called to reload the image
what makes you believe that is happening? and welcome to outfront!

_____________________________

Dan

(in reply to larrytoelle)
larrytoelle

 

Posts: 12
Joined: 2/25/2005
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/25/2005 19:23:38   
Howdy dpf,

I noticed that when using this method for simple links, that the button repainting slowed considerably ... but only when I had refreshed a page with the "home" link instead of using the browser refresh. While playing with it ... I also noticed that I was making server calls as I moused over the links.

At first, I presumed the problem was with some extraneous javascript ... but after eliminating that ... and everything else ... I can recreate the problem with this simple piece of code.

Perhaps I'm not making myself entirely clear ... so bear with me one more time.

Using IE6 ... load the page normally with the following link:

http://www.nocache.onlineheli.com/cgi/test.php

Run you mouse over the buttons and they should react normally.

Now ... press any of the buttons ... and the page will reload.

Again ... run your mouse over the buttons and you should see a noticeable slowdown and also ... notice that the server is being accessed for each button.

Now ... use the browser refresh ... and again run you mouse over the buttons ... normal response should be restored.

That's what is happening on my end ... anyway. I notice that NS and Opera do not exhibit this behavior ... nor does FistPage 2000 in the viewer window.

It's got me a bit stumped ... ok ok ok ... a lot stumped. I don't believe anything is wrong with my IE6 ... it's the latest/greatest ... but ... ya never know.

Thanks for responding ....

LT

< Message edited by larrytoelle -- 2/25/2005 19:33:37 >

(in reply to dpf)
larrytoelle

 

Posts: 12
Joined: 2/25/2005
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/25/2005 19:31:01   
Howdy again dpf,

It occurs to me that it's acting like the cache is failing to return the previously loaded images ... and the browser is reloading from the server?

These images are a bit gruesome in size ... but ... you'd think that after their initial load ... they'd be ok ... and they're not that "huge."

Another little mystery with IE6 and CSS?

LT

(in reply to dpf)
dpf

 

Posts: 7126
Joined: 11/12/2003
From: India-napolis
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/25/2005 20:10:42   
yes, now i see what you mean. I think the problem is that you havent created image objects to hold the images so that js can swap back and forth using the objects - instead, every time you roll over, it is instructed to get the image via path - let me play a second and see

_____________________________

Dan

(in reply to larrytoelle)
larrytoelle

 

Posts: 12
Joined: 2/25/2005
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/25/2005 22:44:28   
Howdy dpf,

Yes ... perhaps ... it's certainly a problem somewhere in that area.

Only guessing ... but it would seem that the images objects are created on the initial call for the image and hung in a collection of images for the duration of the "window" object. When the "window.refresh" occurs ... I'd gess that the collection is disposed ... to be rebuilt again for the subsequent document object. That seems consistent with the browser refresh.

I would've thought that the images collection would be destroyed when a new document is instantiated as well ... but perhaps not. If not, then it still doesn't make sense why the file is being reloaded on "every" access in the document.load instance. Know what I mean? There's a noticeable difference in behavior ...

Either way ... thanks for verifying that someone else is experiencing this problem. It seems to me that this falls into the "bug" bucket ... it's certainly a "performance" problem. Maybe someone at MS could look into this ... if they're paying attention.

I'll look into the document object methods and see if I can find a place to do a window.refresh on the way to document.load. Maybe that'll fix it ...

Thanks again ... I'll let you know what I find out.

LT

(in reply to dpf)
dpf

 

Posts: 7126
Joined: 11/12/2003
From: India-napolis
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/26/2005 8:53:18   
Larry : I was thinking about this last night. Partly, it is aq classic case (altho this doesnt explain everything) of why all javascript mouseover programs "preload" images. when the page first laods, the images in the "tabup" class are displayed and therefore downloaded but the other "states" are mere references and thus not dowloaded initially - not until you do the mouseover and they are needed are they called from the server - a preload downloads all the images and so they are available when needed with no delay.

I just noticed something, look at your url:
http://www.nocache.onlineheli.com/cgi/test.php
does the "nocache" prevent them from being cached and thus causing the problem????????

_____________________________

Dan

(in reply to larrytoelle)
larrytoelle

 

Posts: 12
Joined: 2/25/2005
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/26/2005 9:28:30   
Good morning dpf,

That's a good point ... I'd expect the blue version to be there at display time ... and red perhaps ... to be fetched when first needed. After that however, both blue and red should be on the client and in the cache. In the instance we're discussing ... it seems to need a server request for each occurance of either red or blue ... not the way it's supposed to work ... or at least not the way it works on other browsers.

I ran this through IE5 about an hour ago ... and IE5 seems to work properly ... as do NS and the others. So far ... it's an IE6 only problem.

Keep in mind ... either a "refreshed" load or the "first load" work fine. The problem only occurs after the page is linked to itself.

I've tried to chase down the file handle for the backgroundImage ... but so far ... haven't had any luck. I was hoping to see if the file handle could reveal whether or not the file had been loaded, in cache, or somehow present or not. I'm afraid I've been away from this stuff too long.

I ran across the following on another board ... it's the closest thing I've found on this problem so far. It sounds similar ... but????

http://www.pmachine.com/forum/threads.php?id=18149_0_21_0_C

It's possible that this behavior has gone unnoticed ... but I'd think that someone would've run across it by now. If, as I suspect, there's some setting or another in IE6 that affects this ... then it's going to be an issue for those of us that choose to implement these sorts of links. With a long list of these ... the problem is readily apparent.

I was hoping that I could use this technique with CSS ... but ... I'm about ready to throw in the towel on it. This behavior is too annoying to be of any use ... don't you think?

To wit: http://www.nocache.onlineheli.com/cgi/index2.php

The "nocache" server is a path around server cacheing. This particular server caches its websites ... and an updated page takes a while to get into the cache. You can access the the test page now ... by going to:

http://www.onlineheli.com/cgi/test.php

By now it has found itself into the cached website. It still acts the same.

Thanks again for examining this problem ...

LT

(in reply to dpf)
dpf

 

Posts: 7126
Joined: 11/12/2003
From: India-napolis
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/26/2005 9:57:34   
quote:

This behavior is too annoying to be of any use ... don't you think?
on that point, absolutely. Intriguing problem - it will bug me all day..lol. sorry i couldnt be more help

_____________________________

Dan

(in reply to larrytoelle)
dpf

 

Posts: 7126
Joined: 11/12/2003
From: India-napolis
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/26/2005 10:00:52   
you said there is no php code in it? if that is the case, why .php? maybe rename it .html and see what happens?? worth a shot

_____________________________

Dan

(in reply to larrytoelle)
larrytoelle

 

Posts: 12
Joined: 2/25/2005
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/26/2005 10:05:38   
Howdy Dan,

Ah ... don't let it bug you too much. Just one of those little mysteries ....:)

LT

(in reply to dpf)
dpf

 

Posts: 7126
Joined: 11/12/2003
From: India-napolis
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/26/2005 10:07:32   
quote:

Just one of those little mysteries
you mean like "where are my car keys????"

_____________________________

Dan

(in reply to larrytoelle)
larrytoelle

 

Posts: 12
Joined: 2/25/2005
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/26/2005 10:11:55   
Yup ... did that already ... same result.

If you think about it ... the only difference between a .php and .htm file is that one goes through the php processor on the server and is sent to the client via "echo" ... the .htm(l) is read as a flat text file and thrown at the client in a similar fashion.

Like you ... I thought it would be worth a try ... but no dice.

LT

(in reply to dpf)
larrytoelle

 

Posts: 12
Joined: 2/25/2005
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/26/2005 10:35:10   
Dan,

You're a genius ...

After saying that I'd tried that ... it occurred to me that I hadn't tried "exactly" that ... I was using a different test earlier when I first ran across this "mystery" ... but ... it wasn't exactly the same test.

Just for S&Gs ... I just put up:

http://www.nocache.onlineheli.com/test.htm on the server's root.

Guess what? ...

Now ... kind sir ... explain to me what the difference is?

I notice that comparing the two "source" pages ... the cgi/test.php and the /test.htm ... that the server has appended some sort of goofy site statistics script ... (why? ... I don't have the foggiest) ... but other than that ... they're identical.

The cheese gets more binding ... huh?

Thanks again ... maybe we're on to something.

LT



(in reply to dpf)
TygerTyger

 

Posts: 16
Joined: 7/31/2004
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/26/2005 10:46:32   
Ah what a coincidence I come across this just as I have the same problem. My m/o images are so small that the delay is nothing more than a slight pause, but it's an ANNOYING pause. Also happens only on IE6. To add insult to injury, I have used the exact same mouseover JS elsewhere which does NOT have a delay. The difference being that page isn't built with CSS. I can't imagine why it would make a difference.

Just in case someone can see a similarity between our two pages that might be causing it, my example is here. It's the three icons on the far right of the top bar that do it.

In fact I have just noticed that absolutely every image is reloaded from cache on my pages, but not text. That's extremely annoying.

The only thought I had was emptying my IE cache in case it thought it had 'run out of space' or something, but surprisingly it didn't work :)

(in reply to larrytoelle)
TygerTyger

 

Posts: 16
Joined: 7/31/2004
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/26/2005 10:53:09   
Addition: I just did a quick experiment, I loaded up my own page and then set IE into 'Work Offline' mode. From that point onwards the m/o images appeared as dead links with a red cross in the corner. For whatever reason it either cannot or will not use it's own cache?

(in reply to TygerTyger)
larrytoelle

 

Posts: 12
Joined: 2/25/2005
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/26/2005 10:59:11   
Howdy Tyger,

I don't see the links you're referring to ...

There are some at the bottom of the page ... but they appear to be ok at this end.

Can you render your page ... or at least the part of the page that is failing from an HTM file ... from the root?

I'm beginning to think that IE6 renders non-HTM(L) pages differently.

Perhaps the PHP people have run into this ... I'll go off and do some research there.

Sure looked like a CSS problem ... but now ... I'm beginning to think it's more PHP related.

LT


(in reply to TygerTyger)
larrytoelle

 

Posts: 12
Joined: 2/25/2005
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/26/2005 11:08:22   
Howdy Tyger,

You're right ... the contact,print & email icons are doing the same thing. They appear on my screen (IE6) at the bottom?

Interesting ...

LT

(in reply to TygerTyger)
TygerTyger

 

Posts: 16
Joined: 7/31/2004
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/26/2005 11:12:20   
Addition addition: Fixed! Smug mode. Add the following into your .htaccess file.

BrowserMatch "MSIE" brokenvary=1
BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
BrowserMatch "Opera" !brokenvary
SetEnvIf brokenvary 1 force-no-vary

No credit to me because I didn't find the fix. Read about it in this thread:
http://archivist.incutio.com/viewlist/css-discuss/30707

It worked for me I hope it does for you. I might get onto my host about this.

< Message edited by TygerTyger -- 2/26/2005 11:22:20 >

(in reply to TygerTyger)
larrytoelle

 

Posts: 12
Joined: 2/25/2005
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 2/26/2005 11:47:05   
Howdy Tyger,

You might be onto something ...

It didn't work for me ... but ... perhaps that's the area where the problem is.

Thanks a bunch ... I appreciate it.

LT

(in reply to TygerTyger)
larrytoelle

 

Posts: 12
Joined: 2/25/2005
Status: offline

 
RE: Simple Rollovers not working on Link to Self. - 3/1/2005 5:43:58   
Howdy,

As a resolution:

I discovered a difference in the HTTP headers being served from from the "cgi/images/buttons" directory and the "cgi/images" directory. "KeepAlive" in particular wasn't being sent.

This particular server does not allow .htaccess overrides ... or a limited set anyway ... so the solution was to move the button images back into the main images directory.

Thanks for the assistance ... it was educational.

LT

(in reply to larrytoelle)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> Simple Rollovers not working on Link to Self.
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts