...

View Full Version : IE vs FF(coding differences)



Shadowfox.web
12-13-2006, 12:32 AM
So i have a javascript & css code that i used for a menu, the menu runs like it should in firefox. when i load it in internet explorer it does load the menu but it wont show the discription on the mouseover script. Why is that? it's so GD! annoying

whizard
12-13-2006, 12:57 AM
I'm not sure there is anything we can do to address your problem unless we can see code..

(not that I am able to deal with JavaScript anyhow; maybe if you post your code or, preferably, a link, one of the JS experts will decide to help you...)

All the best
Dan

Shadowfox.web
12-13-2006, 04:47 PM
my website, http://shadowfox.1111mb.com/ShadowFox_Home.html
in the menu, at the bottom, there's suppose to be a discription that shows up, it will show up in firefox but not in internet explorer i'll copy the code and highlight the area i'm talking about

_Aerospace_Eng_
12-13-2006, 04:57 PM
You need to validate your page first before we can be assured that its a js error and not an html coding error.

http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fshadowfox.1111mb.com%2FShadowFox_Home.html

Shadowfox.web
12-13-2006, 05:13 PM
<!-- START OF SCRIPT --><SCRIPT LANGUAGE="JavaScript">


function setVariables() {
if (document.layers) {
v=".top=";
dS="document.";
sD="";
y="window.pageYOffset";
}
else if (document.all){
v=".pixelTop=";
dS="";
sD=".style";
y="document.body.scrollTop";
}
else if (document.getElementById){
y="window.pageYOffset";
}
}
function checkLocation() {
object="object1";
yy=eval(y);
if (document.getElementById)
document.getElementById("object1").style.top=yy
else
eval(dS+object+sD+v+yy)
setTimeout("checkLocation()",10);
}
</script>
<div id="object1" style="Z-INDEX: 5; LEFT: 0px; POSITION: absolute; TOP: 0px"><!--HighlightMenuScrip--><!-- START OF SCRIPT --><style type="text/css">


#coolmenu{
border: 1px solid white;
width: 170px;
background-color: #74aff6;
}

#coolmenu a{
font: bold 13px Verdana;
padding: 2px;
padding-left: 4px;
display: block;
width: 100%;
color: White;
text-decoration: none;
border-bottom: 1px solid white;
}

html>body #coolmenu a{
width: auto;
}

#coolmenu a:hover{
background-color: #8182f5;
color: white;
}

#tabledescription1{
width: 100%;
height: 3em;
padding: 2px;
filter:alpha(opacity=0);
-moz-opacity:0;
}</style><script type="text/javascript">

// Fading routine based on Dynamic Drive script: http://www.dynamicdrive.com/dynamicindex4/highlightgrad.htm
// This notice must stay intact for use

var baseopacity=0

function showtext(thetext){
if (!document.getElementById)
return
textcontainerobj=document.getElementById("tabledescription")
browserdetect=textcontainerobj.filters? "ie" : typeof textcontainerobj.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
document.getElementById("tabledescription").innerHTML=thetext
highlighting=setInterval("gradualfade(textcontainerobj)",50)
}

function hidetext(){
cleartimer()
instantset(baseopacity)
}

function instantset(degree){
if (browserdetect=="mozilla")
textcontainerobj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
textcontainerobj.filters.alpha.opacity=degree
else if (document.getElementById && baseopacity==0)
document.getElementById("tabledescription").innerHTML=""
}

function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.2, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=20
else if (window.highlighting)
clearInterval(highlighting)
}

</script>
<div id="coolmenu"><font color="#0000ff"><font face="Comic Sans MS" color="#8182f5">
<h3>Main Menu</h3>
</font><a onmouseover="showtext('Learn about this site')" onmouseout="hidetext()" href="SF_About.html"><font color="#0000ff">About</font></a> <a onmouseover="showtext('Learn about the book I am writing')" onmouseout="hidetext()" href="UntitledFrameset-1.htm"><font color="#0000ff">My Book</font></a> <a onmouseover="showtext('Veiw all my e-mail address, I have more than 1')" onmouseout="hidetext()" href="SF_Emails.html"><font color="#0000ff">Contact ME</font></a> <a onmouseover="showtext('My Blog! Random Facts and Other random things!')" onmouseout="hidetext()" href="SF_Blog.html"><font color="#0000ff">My Blog</font></a> <a onmouseover="showtext('Contact Me If you like my work or have a question')" onmouseout="hidetext()" href="SF_Design.html"><font color="#0000ff">My Design Address</font></a> <font face="Comic Sans MS" color="#8182f5">
<h4>My Links</h4>
</font><a onmouseover="showtext('Chat Site, Way better than myspace')" onmouseout="hidetext()" href="http://www.myyearbook.com"><font color="#0000ff">My Yearbook</font></a> <a onmouseover="showtext('Zenhex Forums, created by Zen a webdesign genious')" onmouseout="hidetext()" href="http://www.zenhex.com"><font color="#0000ff">Zenhex Forums</font></a> <a onmouseover="showtext('Mail server, way better than yahoo, better features and less spam')" onmouseout="hidetext()" href="http://mail.google.com"><font color="#0000ff">Gmail (Google Mail)</font></a> <a onmouseover="showtext('Good freeware only site to download software for pc')" onmouseout="hidetext()" href="http://www.freeware4pc.com"><font color="#0000ff">Freeware 4 Pc</font></a> <a onmouseover="showtext('Good site to get trial software some freeware')" onmouseout="hidetext()" href="http://download.cnet.com"><font color="#0000ff">CNet Downloads</font></a>
<div id="tabledescription"></div><<on the table description, it's suppose to do the function "showtext()" but it doesn't show up in IE it's driving me nuts

Shadowfox.web
12-13-2006, 05:16 PM
You need to validate your page first before we can be assured that its a js error and not an html coding error.

http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fshadowfox.1111mb.com%2FShadowFox_Home.html

um yeah, well i just modified it, at first it didn't have the basic tags, html, title, head, body. but i fixed it, it's not html problem it is javascript. and if it's going to take all that to make it work just forget i asked, i'll leave it alone. the freakin validator gave me 19 errors, but i don't care about them cause the script loads in firefox which is the main browser i use on my own computer

rmedek
12-13-2006, 06:04 PM
Why did you post this in the HTML forum, then?

And please read the Rules (http://codingforums.com/rules.htm) and Posting Guidelines (http://codingforums.com/postguide.htm) before starting a new thread. Specifically, these points:


2) Type in a subject that summarizes your question- A great way to turn off other members wanting to help you is to type an incomplete or silly subject for your post. Examples of poor subject titles include:

- "Help!"
- "I'm a newbie...be gentle"
- "How can I..."
- "Urgent...deadline tomorrow!"

The above subjects either have absolutely nothing to do with the question itself, or are grossly incomplete (ie: "How can I..."). When asking for help, enter a subject that summarizes your question, period! Don't use silly, incomplete, or "bait" subjects. Some examples of good titles are:

- "How do I round a number to 2 decimal places using JavaScript?"
- "What's the difference between require() and include() in PHP?"
- "Can someone suggest a good, free HTML editor?"

3) Be descriptive and articulate when asking your question- When posting, understand that you're trying to convince others to help you. Be articulate and have respect for the English language! Some important guidelines on this:

- Always do a quick check for spelling/grammar mistakes, both in your subject and post itself.
- Format your question and code in an easily legible manner. Use the preview button often.
- Be concise and articulate as much as possible.

Excavator
12-13-2006, 07:48 PM
um yeah, well i just modified it, at first it didn't have the basic tags, html, title, head, body. but i fixed it, it's not html problem it is javascript. and if it's going to take all that to make it work just forget i asked, i'll leave it alone. the freakin validator gave me 19 errors, but i don't care about them cause the script loads in firefox which is the main browser i use on my own computer

Hello Shadowfox.web,
_Aerospace_Eng_ really is trying to help you. Without a doctype and validating your code you can't seriously expect different browsers to render your page the same. If all you want to write for is firefox that's fine but you just alienated about 75% (don't really know how many people use IE) of the people on the web.

Anyway, I was looking for a project this morning and I recognized your menu from one I had done a while back. Totally js free. Have a look at it athttp://www.nopeople.com/shadow/coolmenu.html

Shadowfox.web
12-14-2006, 01:22 AM
Why did you post this in the HTML forum, then?

And please read the Rules (http://codingforums.com/rules.htm) and Posting Guidelines (http://codingforums.com/postguide.htm) before starting a new thread. Specifically, these points:
sorry, i didn't realize

Shadowfox.web
12-14-2006, 01:24 AM
Hello Shadowfox.web,
_Aerospace_Eng_ really is trying to help you. Without a doctype and validating your code you can't seriously expect different browsers to render your page the same. If all you want to write for is firefox that's fine but you just alienated about 75% (don't really know how many people use IE) of the people on the web.

Anyway, I was looking for a project this morning and I recognized your menu from one I had done a while back. Totally js free. Have a look at it athttp://www.nopeople.com/shadow/coolmenu.html
um yeah, i don't know what it's supposed to do, but it writes text over the bottom part of the menu.

Excavator
12-14-2006, 01:33 AM
Buttons were next to the float... had to clear them for FF. Oops.

Shadowfox.web
12-14-2006, 02:03 PM
Buttons were next to the float... had to clear them for FF. Oops.
hey that's cool, does it work in firefox too? i'm using IE right now, not my own computer, schools, waiting for instructor to get here so i can take a us gov and pols final

Shadowfox.web
12-15-2006, 09:04 PM
he excavator, can i use that code on my site?

Excavator
12-15-2006, 10:32 PM
Of course you can, that's why I posted it.

/*edit- that link to your site is dead...*/

Shadowfox.web
12-18-2006, 06:50 PM
Of course you can, that's why I posted it.

/*edit- that link to your site is dead...*/

Yeah, kind of noticed, haven't been on here for a while, the company i was with died, so my site died. i very pissed at them. only had it for about 5 days



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum