PDA

View Full Version : browser compatability with script



rich1234
05-26-2006, 10:35 PM
Script: image w/ description tooltip.

http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm


Hi there. This script works a treat on my page. I am just wondering about browser compatability. You state what browsers it is compatable with. When I do a compatability test with earlier versions than you mention, ie explorer4 and navagator 4 frontpage tells gives me this report

Line 7: In Internet Explorer 4.0 / Navigator 4.0 the attribute HREF is not permitted for the <LINK> tag.
Line 6: In Internet Explorer 4.0 / Navigator 4.0 the attribute TYPE is not permitted for the <SCRIPT> tag.
Line 394: In Internet Explorer 4.0 / Navigator 4.0 the attribute TYPE is not permitted for the <SCRIPT> tag.
Line 395: In Internet Explorer 4.0 / Navigator 4.0 the attribute TYPE is not permitted for the <SCRIPT> tag.
Line 396: In Internet Explorer 4.0 / Navigator 4.0 the attribute TYPE is not permitted for the <SCRIPT> tag.


Does this mean that it could work in these earlier browser versions with some tweaking. If so any idea what tweaking would do the trick. I have language= java in the script tag too, but I need the type to get verified html, so I carnt get rid of type Conflict of interests it seems!

These earlier versions do not reject the mouseover tag, so do you think the pop ups will work anyway without the above conflict having any affect?

Thanks in advance for any advice.
All the best
Richard

jscheuer1
05-27-2006, 07:14 AM
I wouldn't worry about what is 'permitted' in earlier browsers. If the script happens to work in one or more of them fine. If not, I wouldn't concern myself with it unless I needed to be compliant with those browsers that hardly anyone uses anymore.

Not permitting the href attribute for a link tag will put a stop to external style but, those browsers don't recognise any style anyway. Not permitting the type attribute for a script tag probably won't hurt anything. Whatever you do, don't use language="java". Unless it is java. These are javascripts. not java code, there is a big difference. The language is javascript but, that was never required by these older browsers as far as I know, and they should just ignore the type attribute.

The biggest problem for older browsers will be unsupported style, elements and code objects. Other than a complete rewrite, there is not much you can do about those if they cause problems.

rich1234
05-28-2006, 01:59 PM
Dear John, Thanks for your comments, they were very helpful.
Thanks.
Richard

Twey
05-28-2006, 05:16 PM
Older browsers are not usually a problem, except in special cases like IE5, which is the latest version available for Mac, and Netscape 7, which is the latest version available for Mac and Linux.

jscheuer1
05-29-2006, 09:11 AM
Older browsers are not usually a problem, except in special cases like IE5, which is the latest version available for Mac, and Netscape 7, which is the latest version available for Mac and Linux.

Both of those browsers are more recent than the OP mentioned and, for the most part, can be worked around effectively using techniques they recognize as substitutes via object testing. IE Mac is a bit trickier as its HTML parsing engine is unique, to put it mildly. But, its scripting is fairly straightforward if your script uses object tests for branching and degrades well on all branches.

rich1234
05-29-2006, 08:59 PM
Dear John, I have just tested my page on internet explorer for mac. the pop ups work, but the links are spread all over the page and not contained within the cell that they should be.

Basically I have

<tr>
<td width="60%" bgcolor="#333333" rowspan="12">
<h2><font color="#808080">The</font> Yesterday</h2>
<p class="link">
<a href="http://www." onmouseover="doTooltip(event,33)" onmouseout="hideTip()">yesterday</a>&nbsp;
<a href="http://www." onmouseover="doTooltip(event,34)" onmouseout="hideTip()">yesterday</a>&nbsp;
<a href="http://www." onmouseover="doTooltip(event,35)" onmouseout="hideTip()">yesterday</a>&nbsp;
<a href="http://www." onmouseover="doTooltip(event,36)" onmouseout="hideTip()">yesterday</a>&nbsp;
<a href="http://www." onmouseover="doTooltip(event,37)" onmouseout="hideTip()">yesterday</a>&nbsp;
<a href="http://www." onmouseover="doTooltip(event,38)" onmouseout="hideTip()">yesterday</a>&nbsp;
<a href="#" onmouseover="doTooltip(event,209)" onmouseout="hideTip()">yesterday</a>&nbsp;
<a href="#" onmouseover="doTooltip(event,210)" onmouseout="hideTip()">yesterday</a>&nbsp;</td>


The p class is justify, The rest of the page elements are fine, only the links span the whole page, leaving the cell and cover all other elements. This only happens in mac explorer. Its fine in safari.
Any ideas what is causing this?

Some how it is being justified to the page and not the cell and therefore leaping out of it.


Any ideas would be greatly appreciated.
Thanks
Richard

jscheuer1
05-29-2006, 09:09 PM
I have no Mac to test on but, your td closes (</td>) before any closing </p> tag. Also, I see no closing </tr> tag but, that could come later. The HTML must first be well formed. After that, if there are still problems, it likely would be the style or attributes. For example, width 60% and rowspan 12 might not be strictly accurate, and I cannot see all the rules for the p element. Many modern browsers have a way of being kind in those situations but IE Mac most likely was not coded to be like that.