17 replies [Last post]
cobwebs
Offline
newbie
PA
Last seen: 15 years 45 weeks ago
PA
Joined: 2004-12-17
Posts: 7
Points: 0

Hi all,

New to the boards, but what a wealth of good information here! I thank Google for leading me here just by typing "css forum" in the search box.

Now, onto my problem, if anyone can help me.

I want to use an image on a page as a link. More specifically, I want to use a small .gif file to allow a web page visitor to download the Acrobat Reader instead of a text link.

I have done something strange (using HTML 4.01 Strict, BTW) apparently, because I can't get the image to show up. It is there in my code, in my HTML editor (Homesite 5) and in the preview feature, but when I upload it to my server space, the page rendered doesn't show the image (there's just a blank space) no matter whether it's IE, Netscape, or Firefox. To make matters worse, when I right click to "View Page Source" it shows up in the code as a blank-- not even there! How can that be? If it is in my HTML, why does it not show up on the pages?

I've checked my stylesheet closely, checked my HTML code, and simply cannot find where my error is. I even checked my images directory to make sure that the .gif file is there, but I'm not even getting the little black outline box that you would get if the image was called for but not where the browser was looking for it.

Worst of all, as the top left corner of the page, I am using the company logo as a "return to home" link (and that is the exact same function that I'm having trouble with re the "Get Acrobat" gif file) and it works fine.

I can post my code, but before I take up too much space, I wanted to just post the problem and see if anyone thought it sounded familiar. I Googled the problem but couldn't find anything at all this evening. I've not run into this problem before. Has anyone else?

I sure do thank you for your time and patience with this. I'm stumped and my brain hurts... so it must be a really simple thing I just can't see. I apologize in advance accordingly!

Thanks!

co2
co2's picture
Offline
Leader
UK
Last seen: 12 years 28 weeks ago
UK
Joined: 2003-09-17
Posts: 721
Points: 0

Using image as link... does not appear on page

It's gonna have to be the code methinks?

The only thing I can think of is file permissions on the server, but if it isn't showing in code view then sounds a bit more weird.

So, post a link or the code (actually, the code, the link won't show it will it! Laughing out loud )

Smile

The next sentence is true. The previous sentence is false. Discuss...

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 7 years 13 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Using image as link... does not appear on page

Splash out - it's Christmas! ...go for the code AND the link - live dangerously Laughing out loud

Life's a b*tch and then you die!

cobwebs
Offline
newbie
PA
Last seen: 15 years 45 weeks ago
PA
Joined: 2004-12-17
Posts: 7
Points: 0

okay, the link....

... is http://www.index.html

Site is still under construction, pending more incoming info, but I just noticed this oddity today.

*drum roll*

and the code:

***SNIPPED*

The segment in question (that doesn't show up on right click) is where the table data cell has the "class=infoarea" attribute... you'll see the <a> tag surrounding the <img> tag with the image being "getacrobat.jpg" as the link.

Hope this is clean enough to scan, though not heavily commented.

Try your right click and tell me if you can see the missing code. Tis why I inserted the material from the local machine instead of the right click.

As of yet, I've not been able to duplicate this on another machine... will have opportunity at work tomorrow afternoon, will check then in case it is some problem with my web/network/firewall settings, but I still couldn't come up with a reasonable explanation of why this method works for the company logo in the upper left corner, plus the code is a blank space on right click.

*scratching head, losing hairs*

cobwebs
Offline
newbie
PA
Last seen: 15 years 45 weeks ago
PA
Joined: 2004-12-17
Posts: 7
Points: 0

...and the style sheet:

body, div {
font-family : Verdana, Arial, Helvetica, sans-serif;
text-align : justify;
}

img {border:none;}

a:link {
color :#000066;
}

a:visited {
color : #000099
}

a:active {
color : #193145;
}

a:hover {
color : #ff0066
}

.footer a:visited {
color : #000099;
text-decoration : none;
}

.footer a:hover {
color : White;
text-decoration : underline;
}

.navtab a:link {
color : #ffffff;
text-decoration : none;
}

.navtab a:visited {
color : #ffffff;
text-decoration : none;
}

.navtab a:active {
color : #ffffff;
text-decoration : none;
}

.navtab a:hover {
color: Red;
text-decoration : none;
}

.tab a:link {
color : #ffffff;
text-decoration : none;
}

.tab a:visited {
color : #ffffff;
text-decoration : none;
}

.tab a:active {
color : #ffffff;
text-decoration : none;
}

.tab a:hover {
color : #ffcc66;
text-decoration : none;
}

.nowrap {
white-space : nowrap;
}

.companytitle {
font-size : 20px;
font-weight : bold;
text-align : right;
margin : 0;
padding : 0px 0px 2px 0px;
}

.inputtext {
border-width : 1px;
font-size : 12px;
padding : 2px;
border-color : #999999;
border-style : solid;
background-color : #FFFFFF;
}

.footer {
background : #98ABCE;
font-size : 10px;
color : #05018C;
text-align : center;
padding : 2px 10px;
line-height: 130%;
border-style : solid;
border-color: #05018C;
border-width : 0px 0px 3px 0px;
}

.pagecontainer {
border-style : solid;
border-width : 1px;
border-color : Red;
padding : 10px;
font-size: 12px;
}

.pagetitleL {
font-size : 12px;
color: #000066;
text-align : left;
padding-left : 14px;
}

.pagetitleR {
font-size : 14px;
font-weight : bold;
color: #000066;
text-align : right;
padding : 7px 0px;
}

.filterbar {
background-color : #DAE8FF;
border-color : #999999;
border-style : solid;
border-width : 1px 0px 1px 0px;
text-align : right;
padding : 0px 15px;
}

.mirror {
border-color : #FFFFFF;
border-style : solid;
border-width : 3px 0px 0px 0px;
}

.filtertitle {
font-size : 12px;
padding : 10px;
text-align : right;
}

.navbar {
background-color : #98ABCE;
border-color :#05018C;
border-style : solid;
border-width : 0px 0px 4px 0px;
}

.navtab {
border-color : #ffffff;
border-style : solid;
border-width : 0px;
font-size : 13px;
font-weight : bold;
color : #ffffff;
padding : 5px 15px;
text-align : left;
}

.navtabactive {
background : #05018C;
border-color : #ffffff;
border-style : solid;
border-width : 0px;
font-size : 13px;
font-weight : bold;
color : #DAE8FF;
padding : 5px 15px;
}

.section1 {
font-size : 13px;
font-weight : bold;
color : White;
padding : 5px 10px;
background-color : #98ABCE;
}

.phoneline {
text-align : center;
font-weight : bold;
}

.standout { font-weight: bold;}

.sidebar {
padding : 5px;
width : 153px;
}

.sidebarheader {
background : #DAE8FF;
font-size : 12px;
color: #000066;
padding : 5px;
}

.infoarea {
color: #000066;
border : 1px solid #98ABCE;
padding-left: 10px;
padding-top: 8px;
padding-right: 10px;
padding-bottom: 8px;
}

.tablehead {
color: #000066;
background : #FFFFFF;
padding-top: 5px;
padding-right : 2px;
padding-left : 2px;
}

.tablebody {
color: #000066;
background : #FFFFFF;
padding-left: 3px;
padding-top: 5px;
}

.tablesubhead {
color: #000066;
background : #FFFFFF;
padding-left: 3px;
padding-top: 5px;
font-size: 13px;
}

.tablebottom {
color: #000066;
background : #FFFFFF;
padding-top : 5px;
text-align : center;
}

Just so you know... I also ran this code (above) through the W3C Code validator and it passes every time. So that method, also, was of no assistance. I'm really pinning my hopes on someone here that loves a conundrum... or conversely, a real lemon of an oversight.

As I said earlier tonight, I very much appreciate the brain cells being applied to this. Sharing knowledge is a precious commodity and it is never taken for granted on this end.

Thanks again for your time.

cobwebs

seanisean
Offline
Regular
UK
Last seen: 11 years 26 weeks ago
UK
Joined: 2004-12-17
Posts: 38
Points: 0

regarding missing link

just checked your site cobwebs and all appears well, I assume you fixed the problem? just wondering if your gonna post the gory details just out of pure curiosity... I placed my first post here the other day... only to be informed by hugo of the simplest oversight, just as well these guys are the of tolerant type giving up they're time to deal with my inane problems Wink
regards
sean

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 7 years 13 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Using image as link... does not appear on page

cobwebs - something very odd is going on here. When I check your code at the browser it is the same as your post and all looks well. But when I save the page to my desktop using FireFoxe's 'save as...' feature and then look at what has been saved, I get this snippet:

 
<table border="0" width="168"> 
<tbody><tr> 
<td><span class="webdeveloper-dimensions-span">165x194</span><img src="index_files/meetingopt.jfif" alt="Nation One Settlement Services offer closings fast, convenient, and fairly priced." height="194" width="165"></td> 
</tr> 
<tr><td> </td></tr> 
<tr> 
<td class="sidebarheader"><strong>    Order Form Online</strong></td> 
</tr> 
<tr> 
<td class="infoarea">Use our downloadable and printable order form (PDF) to fax back to us for quicker service. <br><br><a href="http://www.anothergranddesign.com/nation1/orderform.pdf">Our Order Form</a><br><br> <a href="http://www.adobe.com/products/acrobat/readstep2.html"><span class="webdeveloper-dimensions-span">88x31</span><img src="index_files/getacrobat.jfif" alt="Get Adobe's Acrobat Reader Here!" height="31" width="88"></a> </td> 
</tr> 
</tbody></table> 

Does this look familiar to you?

If it does not, what are the site's hosting arrangements? Is the site being served from a load-balanced cluster? Does your hosting company use a mirror?

I have to go out now but when I get back I'll check the DNS records to see if I can spot anything obvious with the A records. Two different pages are being served here and there has to be a reason for it!

Roy.

Life's a b*tch and then you die!

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 7 years 13 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Using image as link... does not appear on page

Well the domain name only has one A record so that rules out Round-Robin DNS clustering (which would mean that two servers were serving different copies of the same page). But this does not rule out other forms of clustering with file-tree replication so you'll need to let us know more about the hosting arrangements, and whether or not the snippet I posted above is an earlier/previous version of your page. Are you using any server-side scripting to generate the page or is it a static html file? Do you have any mod_rewrite rules in your webserver config file or .htaccess file?

Life's a b*tch and then you die!

cobwebs
Offline
newbie
PA
Last seen: 15 years 45 weeks ago
PA
Joined: 2004-12-17
Posts: 7
Points: 0

I'm hugely baffled!

Okay, first things first... at work today, I accessed the page and the .gif file showed.

Second, I see what you are saying about the saved code... and I hadn't tried that as of yet. Good grief, it only gets stranger, doesn't it?

I'm using GoDaddy "economy hosting" with this site-- I'm unaware of any ususual configurations on their part, but that doesn't mean it's not a reality. The code I posted isn't a previous version... should be the exact same thing I uploaded and haven't touched since yesterday afternoon. It's a static HMTL file, no tricks or anything complex for the material at hand.... no mod_rewrite, .htaccess, or anything at all from me... though it could be inserted at the server end by the hosting provider.

I hate things like this... perhaps should open a ticket with the hoster, but we never get "paid" for that time spent, do we? Still and all... why on earth would it appear as I coded it (didn't right click at work-- was too shocked to see the graphic file where it was supposed to be!) on that system, but not here at home?

And why would the code in the raw form (opened in either Notepad or Homesite 5.Innocent show me exactly what I *know* I wrote, yet the right click in any browser will not?

*sigh*

The mystery deepens now that RTB says saving a copy thru Firefox gives even stranger code inserts.

I use Firefox for my personal browser as well... will go now and try to duplicate that inserted code snippet, then perhaps open that ticket with GoDaddy.

Anyone else with ideas, please jump in and get your feet wet!

Thanks for your help... will keep you in touch with any progress made.

Cobwebs

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 41 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Using image as link... does not appear on page

Hm, just to further confuse things I did as Roy did and used 'save page as' in FF and also copied and pasted the source view code into notepad and got exactly the same as the browser was displaying and contrary to what you and Roy have experienced :?
Not much help I know :roll:

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 7 years 13 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Using image as link... does not appear on page

I've just come back from a Christmas doo [hic] and saved the file again - with the same results :? This is very strange :-k Are you sure this code means nothing to you? ...for example, have you ever used the tag <tbody>?

...I'm intrigued!

Life's a b*tch and then you die!

cobwebs
Offline
newbie
PA
Last seen: 15 years 45 weeks ago
PA
Joined: 2004-12-17
Posts: 7
Points: 0

Weirder and weirder....

Nope, never have used the tag TBODY, but it's showing up, isn't it?

I just got a reply back from the hosting provider, which was about as generic as I'd expected. A snip (the only semi-important thing in the reply) of it says:

Quote:
Godaddy Software Inc web hosting accounts do not change any of the content uploaded to hosting accounts. There are no programs running on our systems that would alter your content.
I wrote that I had uploaded fully validated code, written by hand (not in a code generator) and asked if their software created alterations.

One thing I noticed when I used Firefox to save to Desktop: there is a line right before the </head> tag that I didn't code:
<script language="javascript" src="index_files/js.js"></script> What I *did* code in that line is up above in the copy-n-paste I provided yesterday. I still haven't changed a whit of the code. I'm not going to until I can satisfy myself that there is nothing else to try, which hasn't happened yet.

Also, using IE 6 with Paessler's IE Booster to give me the Show Source (right click) I see that same line rendered as
<SCRIPT language=javascript src="http://127.0.0.1:1027/js.cgi?pca&r=26962"></SCRIPT>

Does any of this look familiar to anyone here? GoDaddy is suggesting that the site may have been hacked or compromised, yet it seems not to be true in actuality... if it were hacked, surely the link would show, but perhaps send a click-through to another [unintended] destination site. All of my site-internal links work; all other external links work correctly... so if one were to hack a site wouldn't one do it for kicks, for possible theft of sensitive data, or to deface or shut down? Therefore, I sort of reject the theory that it has been hacked.

I also have never had any erroneous or inserted code show up like that using the editor that I do. Methinks the rep may be mistaken about what their server/hosting environment does to the files uploaded... especially in view of the strange code lines above.

Still, all conjecture on my part. If anyone can sniff something in the wind here, let me know. I'm going to Right Click tomorrow at work for SURE.

Gotta go get my broom and sweep those fresh cobwebs outta the corner!

Ta!

cobwebs
Offline
newbie
PA
Last seen: 15 years 45 weeks ago
PA
Joined: 2004-12-17
Posts: 7
Points: 0

Check this....

I just Googled the javascript line inserted in my file.

Now, suspicious as I am about all this... I opened the index.html file in Notepad in case my copy of Homesite was corrupted, but NOoooooo.... that line was NOT in the file anywhere. Then I opened Homesite and looked at the same file inside it... no line like that.

This is when I simply pasted it into my Google Bar. Interesting results, yet not sure that it's the complete culprit here... yes, I have ZAPro running on my machine... but how does that explain the strange results all of you have had?

Okay, enough for now... I can smell my hair folicles frying... delicate circuitry that it is, I need to take care not to stress out those brain molecules overmuch.....!

Onward coding soldiers!

Oh, and happy holidays, too!

Cobwebs

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 7 years 13 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Using image as link... does not appear on page

cobwebs - I think we have a red-herring here. I saved your page as a 'web page, html only' and then checked it with BBEdit, only to find that the file was as shown at the browser. I saved it again as a 'web page, complete' and then checked it to find the altered version. Hmmmmmm.

So I saved one of my own web pages as 'web page, complete' and the only thing that was altered was the paths, as expected given that it is creating a local mini-site. But that was a pure XHTML/CSS document, so then I saved an HTML/table web page and bingo: the same kind of changes were being made to my files as to yours (tag properties swapped around; <tbody> tags added etc.).

I think the red hearing is FireFox 1.0 (Mac). When one saves a page as 'html only' it saves the page unaltered, but when one saves it as 'complete', it obviously parses the code and reformats it into what it considers to be correct code. Presumably this is to compensate for badly written code and I suppose that as long as the saved page works when viewed locally, who is to say that there is anything wrong with doing this! I will check out the mozilla site later today to see if I can find out more about this.

Getting back to your original problem, are you now suggesting that ZAPro (which I note is some sort of Windoze firewall) might be altering your incoming web pages before they hit your browser?

Life's a b*tch and then you die!

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 41 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Using image as link... does not appear on page

Zone Alarm pro will, if the options are set, render javascript and ad code in-operable by rewritting the code before it gets to the browser and can cause confusion if one isn't aware of it.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

cobwebs
Offline
newbie
PA
Last seen: 15 years 45 weeks ago
PA
Joined: 2004-12-17
Posts: 7
Points: 0

Pooh tinkee... I smell a fish.

Indeed it was just that, Roy... I tried the same experiment and it led to the same results as you had. Doh.

However, further examination of the ZAPro issue has led me to the culprit itself... firewall privacy settings.

Disgusting but a reality. So... for folks with similar issues (and judging from the wealth of resultant hits on Google, there are quite a few) they simply will not see anything... a total blank, the cursor doesn't even indicate a "hidden" graphic or link.

What's a web designer to do? I guess it does demonstrate yet again how important it is to test in a variety of environments and platforms.

So, Hugo... yes, you are perfectly correct. And since ZA in all its incarnations is generally a good thing for most PC users, it's a fact we should be aware of. But like so many other things, we can't do much about it and I doubt it is the majority of web browsing individuals who will experience this. And if they do, they won't even know! :?

There is ample proof in the Zone Labs Users Forums that ZAPro does this based on security and privacy settings and it extends to things besides javascripting embedded in web pages. It also extends to all the browsers, not only IE or Firefox.

But for me, the mystery has been solved. I'll continue to hang around here, though... as I said a few days back... the amount of shared knowledge and experience is dazzling!

Thanks to you all who responded, and I hope the rest of the community who viewed this thread will have learned another little tidbit and can alert other developers and coders of this unusual problem if and when it arises.

cobwebs

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 41 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Using image as link... does not appear on page

It was a problem I encountered quite a while ago and it produced a lot of frantic hair pulling and confusion at the time, it didn't occur to me that the firewall was to blame :roll:
Sadly running without a firewall on windows is not recommended nowadays and for the majority of peoples systems that I look after ZAP is the easiest for them to handle, but as you say it just throws another point of failure in the way.
I still have ZAP on one of my boxes but for the others have switched to Angtiums Outpost firewall as it's a properly rules based system and probably the closest you can get to real firewall protection in a windows software based product , although that isn't saying much and is still open to the flaw that all windows firewalls are pray to.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 7 years 13 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Using image as link... does not appear on page

I have not been able to find anything about the way FireFox alters mark-up code when it saves a page, but I'm glad that I now know it does so. It's also good to know about ZAP. All's well that ends well Smile

Life's a b*tch and then you die!