homepage Welcome to WebmasterWorld Guest from 54.197.183.230
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

This 31 message thread spans 2 pages: 31 ( [1] 2 > >     
Links stopped working in IE but only on local drive
voices

10+ Year Member



 
Msg#: 3520560 posted 12:20 am on Dec 5, 2007 (gmt 0)

I have a css nav bar with text links. 7 Pages with the same nav bar. One page the links stop working in IE, works fine in Firefox. When I upload the page it works fine in both browsers. I copy the links out of my page and paste into a new page, they work. I remove things one by one until nothing is left but the links and they don't work. Finally I rebuild the page and all is working again, BUT the same thing is happening to a different page. The links don't work when I view the file from my hard drive, but they work fine on the server. I delete the file from my harddrive, download the working copy from the server and the links work in Firefox but not IE. Has anyone ever had such an insane thing happen?

 

BlobFisk

WebmasterWorld Senior Member blobfisk us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3520560 posted 12:46 pm on Dec 5, 2007 (gmt 0)

Hi Voices,

Is there an element on the page that might be "covering" the link? It can happen with absolutely positioned elements. If part of the margin (for example) spills over a link, the link does not work as the browser thinks that the click is on the object over the link.

HTH

voices

10+ Year Member



 
Msg#: 3520560 posted 1:38 pm on Dec 5, 2007 (gmt 0)

Good point but that's not it. I stripped all the css out of the file and tried the links, no go. I stripped out everything but the html and body tags and no go. I paste the links to a new page and they work. They work on the server, they work in firefox.
I went to work yesterday, downloaded the new IE. FTP'd the working files off the server and viewed it from my hard drive. Links didn't work on that one same page. Has to be some weird IE thing.

Dabrowski

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3520560 posted 6:09 pm on Dec 5, 2007 (gmt 0)

The answer:

STOP USING LOCAL FILES TO DEVELOP YOUR CODE!

The problem is almost certainly a local file path not being recognised. Use a personal web server to run a private server on your own PC.

If you're using XP (might need Pro) you can install IIS which will work wonderfully for you. It supports multiple host headers so you can run as many sites as you want from local directories on your hard drive.

Control Panel -> Add/Remove Programs -> Add/Remove Windows Components

Tick the box for 'Internet Information Services'. Click 'Details' and make sure you untick the FTP and SMTP services, you won't need those.

Another server I've used is Web Weaver, but only supports 1 site unless you pay for it.

Next you need to create a local DNS. Edit the file:
C:\WINDOWS\system32\drivers\etc\hosts (no extension)

Add entries for some dummy DNS names, like:
127.0.0.1 local.mydomain.co.uk

Now, using IIS create a web site with the same 'host header' and point the root folder at your web files.

Now, when you try to access local.mydomain.co.uk your local server will pick it up, and run it exactly like it's on the net.

voices

10+ Year Member



 
Msg#: 3520560 posted 10:11 pm on Dec 5, 2007 (gmt 0)

But I've been doing it like this for 10 years and never seen such a freakish thing. It made me nervous cause I figured there had to be some little thing out of place in my code causing it. Anyways I wanted to post this in case someone else runs into it.

The hand cursor shows when I go move over the link. When I click it nothing happens.

Dabrowski

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3520560 posted 10:30 pm on Dec 5, 2007 (gmt 0)

See previous post, write it down, go back in time 10 years and give it to your youthful self.

ok, post the code for the offending page.

penders

WebmasterWorld Senior Member penders us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 3520560 posted 11:19 pm on Dec 5, 2007 (gmt 0)

Has anyone ever had such an insane thing happen?

Yes, I have seen this happen - (un)fortunately I wasn't on the frontline to debug it at the time! It was also running a site locally (off a CD), it may have been IE7/Vista but I can't be sure on that. I'm not sure that a satisfactory solution was ever found (to our problem), but the code was never broken down to just the bare links as far as I'm aware.

If you have a minimal code snippet that reliably produces this issue when run locally I'd be interested to see it! Which browser(6/7) and OS (XP/Vista) are you testing?

Certainly Dabrowski's suggestion of developing on a web server is a good one. If you're not on XP Pro (or whatever version of Vista you need to run IIS) then consider installing Apache (there are some easy installs available).

voices

10+ Year Member



 
Msg#: 3520560 posted 12:02 am on Dec 6, 2007 (gmt 0)

I used to have apache installed but only used it when doing some php stuff. IE version is 7.0.5730 131c

I will go strip down the code, test it and paste it here. The first page it happened to I rebuilt and it now works, but the same thing started on another page.

voices

10+ Year Member



 
Msg#: 3520560 posted 12:30 am on Dec 6, 2007 (gmt 0)

<ul>
<li><a href="about.html">About Us</a></li>
<li><a href="employment.html">Employers</a></li>
<li><a href="candidates.html">Candidates</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>

I strip down the page to nothing but the links, save it, reload the browser, click on them and nothing happens. Then I resave the page under a different name and it works. Seems like before I tried renaming the page and it didn't work, but have tried so many tests... who remembers.

I'm running win xp pro

penders

WebmasterWorld Senior Member penders us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 3520560 posted 8:28 am on Dec 6, 2007 (gmt 0)

I used to have apache installed but only used it when doing some php stuff.

Being able to use 'root relative' links (eg. "/img/smile.gif") in the CSS and HTML was a big enough reason for me to start developing on a web server. IMHO having to use relative links everywhere makes your code harder to maintain and altogether less reusable.

I strip down the page to nothing but the links ... resave the page under a different name...

I think we'll need to see more than simply your links... DOCTYPE, headers, the entire page. And importantly what were you calling the page initially? Presumably you have no stylesheet applied?

Are the browser settings at their default? Any security software installed that could effect browser behaviour? Any untoward BHO (Browser Helper Objects) intsalled?

Dabrowski

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3520560 posted 12:40 pm on Dec 6, 2007 (gmt 0)

IE's popup blocker gets a bit tetchy about running JS in local files. Having a personal web server would stop that.

voices

10+ Year Member



 
Msg#: 3520560 posted 1:52 pm on Dec 6, 2007 (gmt 0)

There is a flash header in the page, there are style sheets. There are multiple pages and never more than one page that didn't work at a time. The links on the about page stopped working. I started removing things from the page one at a time, and testing the page. Assumed it was my code even though it worked in all other browsers and on the server. Validated the page and css sheet, all looked good. Nothing left on the page but what I posted above and the links still didn't work. Maybe stuck in the cache so I typed some new text below the links to make sure I was getting a good reload. Still didn't work. Rebuilt the page and now it's working fine, but the contact page started having the same problem.
Tried it on two different computers and the one thing they have in common is the new version of dreamweaver and IE7. The page works, I ftp it off the server to a different computer and it doesn't work in IE. I could suspect the server, but it doesn't happen to all the pages. The customer is ready to go live with the site so I am going to finish it up and then try to look into this mystery more over the weekend.

Dabrowski

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3520560 posted 5:57 pm on Dec 6, 2007 (gmt 0)

The page works, I ftp it off the server to a different computer and it doesn't work in IE

So, it works ON A WEB SERVER, but NOT OFF A WEB SERVER. What do you think might be the problem?

Install IIS on your machine, it's free, and will take you 10 mins. That's less time than you've spent in this thread trying to botch it.

balam

10+ Year Member



 
Msg#: 3520560 posted 6:55 pm on Dec 6, 2007 (gmt 0)

> What do you think might be the problem?

I'll admit I'm not sure, but I do know this: Dabrowski's solution cures the symptoms, but not the disease... Or, put another way, it's no solution at all, since you still don't know what's causing the problem; it's just "out of sight, out of mind."

(And STOP SHOUTING!) ;)

voices

10+ Year Member



 
Msg#: 3520560 posted 8:36 pm on Dec 6, 2007 (gmt 0)

So, it works ON A WEB SERVER, but NOT OFF A WEB SERVER. What do you think might be the problem?

As long as it works on a web server it is not a problem, but since I have never had this occur before I think something must be screwy somewhere. Was going to write it off to gremlins till it happened on yet another computer.

Dabrowski

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3520560 posted 8:47 pm on Dec 6, 2007 (gmt 0)

(And STOP SHOUTING!) ;)

Sorry, I should have used bold instead. It always annoys me when people send me emails in caps!

Dabrowski's solution cures the symptoms, but not the disease

Or you could say, it cures the symptoms because it cures the disease.

I can't believe I'm even being drawn into a discussion about this. IE certainly, not sure about FF, has always treated local files differently. Linking in local files works differently to the way you *should* be linking in server files.

The fact is, you cannot professionally develop a web site, without a web server.

Install IIS on your PC. This will not only fix your problem, but give you a more reliable development platform.

londrum

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3520560 posted 9:27 pm on Dec 6, 2007 (gmt 0)

...I strip down the page to nothing but the links, save it, reload the browser, click on them and nothing happens. Then I resave the page under a different name and it works.

it must be something to do with the cached version of the page, there is nothing else it can be.
that might explain why it only messes up in one browser, as the settings for the cache might be different.

can you put headers on the page? stick some on to make it uncacheable and see if the problem reoccurs. if it doesn't then you'll know it's that.

try putting a <base href="http://www.example.com/" /> tag in the head as well -- it might be having trouble recognising where the page is stored on your local machine.
you'll have to change it to something like
<base href="C:/directory/" /> though, if you're not using a local server.
if it works after you try that, then you need to take Debrowski's advice and start using a local server!

voices

10+ Year Member



 
Msg#: 3520560 posted 12:39 pm on Dec 7, 2007 (gmt 0)

I think it's the flash and the cache. One of the first things I did was remove the flash and then do a reload in IE, it still didn't work. This morning I took out the flash, reloaded the page and the links didn't work. Then I closed the browser, reloaded the page and the links work.

voices

10+ Year Member



 
Msg#: 3520560 posted 1:09 pm on Dec 7, 2007 (gmt 0)

One last test. I let flash CS3 generate an html file. I then added 3 text links, no css, just plain links. The first link worked and the other two failed. So I suppose this wouldn't happen if I was testing on a web server ;) But that still doesn't explain why this happens and only happens sometimes.

londrum

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3520560 posted 8:02 pm on Dec 7, 2007 (gmt 0)

does it still fail when the three links are all pointing to the same page? because that would be weird

voices

10+ Year Member



 
Msg#: 3520560 posted 9:57 pm on Dec 7, 2007 (gmt 0)

Good question... will have to give that a try.

voices

10+ Year Member



 
Msg#: 3520560 posted 1:30 am on Dec 8, 2007 (gmt 0)

I set link 1 and link 2 to the same file, they both work. So you might think that my path is wrong on the 3rd link.

I right click the 3rd link and click open in new window and nothing happens. I right click and click copy shortcut, paste it to a new window and it works. I can also see the correct path at the bottom of the browser window when I hover over it.

Again I delete flash from the page, close the browser and reload the page, without the flash. All links work.

Now this never happened with the previous version of flash. So I go make a new file in Flash 8. Some quick animated text and then I add two links to the html page. Neither link works.

Ok, so I go open an old flash thing I did for a site with version 8 and set some links on the page. It works fine.

voices

10+ Year Member



 
Msg#: 3520560 posted 2:21 am on Dec 8, 2007 (gmt 0)

Solved but I don't understand.

I remove the comments, which were generated by flash and the links work. Why would comments affect anything?

<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->

Dabrowski

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3520560 posted 12:19 pm on Dec 8, 2007 (gmt 0)

Oh so what you had was a broken page, not a broken link.

At least you solved it.

It's possible that one of those comments was broken - thus commenting out the entire page. I've done that occasionally by accident with a malformed SSI.

Still install IIS. Grrrr

voices

10+ Year Member



 
Msg#: 3520560 posted 3:06 pm on Dec 8, 2007 (gmt 0)

Those comments are something you can look up, called Mark of the Web. The purpose of them is to bypass IE security and let you run the files locally. To preview pages you are making, run content from CD etc.

Funny they do the exact opposite! Maybe they need to be removed from around the flash and made to apply to the entire page.

penders

WebmasterWorld Senior Member penders us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 3520560 posted 4:53 pm on Dec 8, 2007 (gmt 0)

<!-- saved from url=(0013)about:internet -->

This is the generic "Mark Of The Web" (MOTW) [msdn2.microsoft.com]. Although it is not quite right! It should read:
<!-- saved from url=(0014)about:internet -->

...and enables the page to run in a different security zone. The number indicates the length of the URL. In this case "about:internet" = 14 bytes. (Although 13 was indeed incorrectly stated on MSDN sometime ago and this may be where the error stems!?) If you specify '0013' IE will only look at the first 13 chars to decide the security zone. This could be a problem!?

The other lines above this are just plain comments.

As you suggest, the MOTW is necessary (in IE) in order to be able to run active content locally (or off a CD). Unless you have manually changed the security settings in IE. Whenever you save a file off the internet in IE, IE automatically adds a MOTW line to every page.

Maybe they need to be removed from around the flash and made to apply to the entire page.

The MOTW always applies to the entire page and needs to be in the first 2KB of the HTML markup.

Actually, it has just dawned on me why the link is not working! Yes, removing the MOTW from this page sorts the problem. But also, adding the MOTW to the destination page would also solve the problem! (I assume the destination page of the links that don't work, do not have a MOTW!?) It is because you are trying to navigate from one security zone to the other, or rather a low security zone to a high one, ie. Internet to Local! You can't for instance follow a link from a page on the internet to a file on your local machine.

So, you really need to add MOTW to every page, not remove it! Or install a web server, which I think has been mentioned already! ;)

voices

10+ Year Member



 
Msg#: 3520560 posted 5:21 pm on Dec 8, 2007 (gmt 0)

I think you are probably right. I will have to do one more test! Installing a web server would have solved the problem, but I still would not have known what was causing it. Now I have actually learned something that will probably come in handy one day.

voices

10+ Year Member



 
Msg#: 3520560 posted 5:43 pm on Dec 8, 2007 (gmt 0)

No, that didn't work. As much as I hated to do it, I just reset all the defaults on my browser.

Without the mark of the web comment I get the annoying pop up that asks if I want to allow blocked content. The flash will run after I say yes and my links work.

With the comment in place the flash will run without asking if I want to run blocked content, which I guess is the purpose of the comment. But my text links which have nothing to do with the flash will not work.

I see no reason why the comment should affect my links but it does.

penders

WebmasterWorld Senior Member penders us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 3520560 posted 8:52 pm on Dec 8, 2007 (gmt 0)

Installing a web server would have solved the problem, but I still would not have known what was causing it. Now I have actually learned something that will probably come in handy one day.

Absolutely.

No, that didn't work.

Ah.

And you added the MOTW comment to both the page with the link and to the page that the link goes to? In otherwords, all your pages? Cleared your cache, closed and opened your browser? (I tend to add the MOTW just below the DOCTYPE.)

voices

10+ Year Member



 
Msg#: 3520560 posted 10:06 pm on Dec 8, 2007 (gmt 0)

The only pupose of the MOTW comment is so the active script can run locally without the annoying popup asking if you want to run it. It does do that job, but breaks my links in the process. Why I don't know, but it is certainly the culprit.

Yes I did put the comments on the page that I linked to, but now that I understand the purpose of the comment I see that would make no sense.

My solution is to toss out the comments and turn the annoying popup off in the browser settings.

It would be interesting to see if someone can duplicate the problem.

Flash CS3 generated the comment and put it right after the body tag. I moved it up to right after the doc type and changed the 13 to 14 and it still doesn't work. There is also one other comment right before the close of the script

); //end AC code
}
</script>

This 31 message thread spans 2 pages: 31 ( [1] 2 > >
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved