Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

HTML hyperlinks not working

Posted on 2013-11-24
8
Medium Priority
?
193 Views
Last Modified: 2013-11-24
I have a simple html file with a large number of links that work correctly and two that do not (there is no response when the links are clicked - this is not a "Page not found" error). All of the referenced pages are in the same folder as the problem html file.

When I paste the two non-working links into a new html document they work fine, so evidently there is something in the problem html page preventing them from working.

I have attached a copy of the problem html file. The 25 links in the javascript dropdown work correctly; the two links on line 27 ("Portfolio View" and "High Level/QPR View") are the ones that do not.

The problem is probably obvious and I have missed it while staring at it too long. Any assistance would be appreciated - thanks.
indextest.htm
0
Comment
Question by:dgmoore1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39672828
Right now your code renders like below.  The tag font face is not valid and why the empty p tag?

<td>
   <font face="Arial, Helvetica">
      <a href="portfolio_view.htm">Portfolio View</a>
      <br>
       <a href="hpt_high_level_view.htm">High Level/QPR View</a>
    </font>
   <p></p>
</td>

Open in new window

Try changing your code where you get rid fo the font tag, and instead use a class on the td or directly in the a tag.  Then use css to control the font.
<td class="something">
      <a href="portfolio_view.htm">Portfolio View</a>
      <br>
       <a href="hpt_high_level_view.htm">High Level/QPR View</a>

</td>

Open in new window

0
 

Author Comment

by:dgmoore1
ID: 39672893
I'll give that a shot - this is just a mockup page and I wanted to get the basics right before working on the css.

Thanks
0
 

Author Comment

by:dgmoore1
ID: 39672900
OK - I tried your suggestion and substituted
<tr>
      <td class="fontstyle"><a href="portfolio_view.htm">PADD Portfolio View</a>
      <br>
      <a href="hpt_high_level_view.htm">High Level/QPR View</a></font><p></td>
    </tr>

Open in new window

but the link behavior does not change.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 44

Accepted Solution

by:
Chris Stanyon earned 1500 total points
ID: 39672913
You have an invalid DOCTYPE which throws you into Quirks mode - not a good thing. This is 2013, so go with an HTML5 DOCTYPE:

<!DOCTYPE html>

Having said that, I can't see a problem. The links on your page seem to work fine (obviously they don't go to the right page because they're relative links)

FYI - the code still has a closing </font> tag and a stray <p> tag for absolutely no reason. Also <font> and <center> are depreacted - drop them from your document completely.
0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39672940
If it still does not work, just post a link to your sample page.
0
 

Author Closing Comment

by:dgmoore1
ID: 39673037
This is on my company intranet and contains proprietary info, so I can't post a link. I did find the problem, however: the line

<!-- saved from url=(0016)http://localhost -->

which I grabbed from an old page (it was originally used to suppress the browser warning about ActiveX content, but must have been superseded in recent years) was causing the problem. I deleted the line and, voila, everything works.

I'm giving you full points because your suggestions are all helpful, even though they did not address the direct cause of the problem. Live and learn - I gotta clean up some of this stuff!

Thanks
0
 
LVL 44

Expert Comment

by:Chris Stanyon
ID: 39673057
The line you deleted is just a comment. I doudt removing a comment will fix anything.

You still have an invalid doctype and lots of deprecated tags.

Run your site through a Validator
0
 

Author Comment

by:dgmoore1
ID: 39673244
True - it is just a comment. But the links don't work with it there and they do work with it gone. After I verified this - and I find it hard to understand also, but it is what it is - I cleaned up the rest of the html and ran it through the W3 School's validator and it's all clean now. But if I add that <!-- comment line back in, the links stop working again. Go figure.

Thanks for your comments.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question