Webmaster Forum

Ezilon Directory   Keyword Research Tool   V7N Directory
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Reply
 
LinkBack Thread Tools Display Modes
Old 02-01-2008, 12:46 PM   #1 (permalink)
v7n Mentor
 
searchbliss's Avatar
 
Join Date: 03-25-06
Posts: 694
iTrader: 1 / 100%
searchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nice
Exclamation Javascript/CSS IE7 problem

I do not have IE7, but I received emails that this generated menu code from my site doesn't display properly in IE7 (which I know is a mess). All of the sub-menus show "open and stacked" when the page loads, when they should only show on roll-over. Can anyone help me with a fix...if there is one? Thanks. Here's the sample menu code:
Code:
<html> <head> <style type="text/css"> <!-- a.bi{ background-color:blue; color:#ffffff; display:block; font-family: MS Sans Serif,sans-serif; font-size:8pt; font-weight:bold; padding:3px 3px 3px 3px; text-decoration:none; border-color: #225555 #000000 #000000 #225555; border-style:solid; border-width:2px; } a.bi:hover{ background-color:#f8f8f8; color:#0000FF; } a.mi{ background-color:blue; color:#ffffff; display:block; font-family:MS Sans Serif,sans-serif; font-size:8pt; font-weight:bold; padding: 2px 2px 2px 4px; text-decoration:none; } a.mi:hover{ background-color:#f8f8f8; color:blue; } .mn{ background-color:blue; border-color: #225555 #000000 #000000 #225555; border-style:solid; border-width:2px; z-index:100; } .sp{ BORDER-TOP:#000000 1px solid; MARGIN:2px; BORDER-BOTTOM:#225555 1px solid } //--> </style> </head> <body bgcolor="#FFFFFF"> <script language="JavaScript"> <!--// var D6=window,Y7=document;function B8(){this.ver=navigator.appVersion;this.agent=navigator.userAgent;this.dom=Y7.getElementById?1:0;this.opera5=this.agent.indexOf("Opera 5")>-1;this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom && !this.opera5)?1:0;this.ie4=(Y7.all && !this.dom && !this.opera5)?1:0;this.ie=this.ie4||this.ie5||this.ie6||this.ie7;this.mac=this.agent.indexOf("Mac")>-1;this.ns6=(this.dom && parseInt(this.ver)>=5)?1:0;this.ns4=(Y7.layers && !this.dom)?1:0;this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5);return this}bw=new B8();z=0;b=0;g="";if(bw.opera5||bw.ns6){b=2};if(bw.ie){g=" style='width: 100%'"}else{z=6}mt=70;ml=10;w=129;mh=23;mw=ml-w;k=0;mt=mt-z;p="<a class='mi'"+g+" href='";q="' title='";r="\"; return true' onmouseout='window.status=\"\"; return true'>";t="</a>";a="' onmouseover='window.status=\"";v="<div class=sp></div>" m=new Array();n=new Array();s=new Array();sw=new Array();su=new Array();st=new Array() m[0]='Web Tools';n[0]='#';sw[0]=120;su[0]='Web Tools';st[0]="";s[0]="" +p+"http://www.searchbliss.com/"+q+a+"Sub 1"+r+"Sub 1"+t +p+"http://www.searchbliss.com/"+q+a+"Sub 2"+r+"Sub 2"+t +p+"http://www.searchbliss.com/"+q+a+"Sub 3"+r+"Sub 3"+t +p+"http://www.searchbliss.com/"+q+a+"Sub 4"+r+"Sub 4"+t m[1]='SEO Tools';n[1]='#';sw[1]=140;su[1]='SEO Tools';st[1]="";s[1]="" +p+"http://www.searchbliss.com/seo-tools/"+q+a+"Sub 1"+r+"Sub 1"+t +p+"http://www.searchbliss.com/seo-tools/"+q+a+"Sub 2"+r+"Sub 2"+t +p+"http://www.searchbliss.com/seo-tools/"+q+a+"Sub 3"+r+"Sub 3"+t +p+"http://www.searchbliss.com/seo-tools/"+q+a+"Sub 4"+r+"Sub 4"+t m[2]='Webmaster Forums';n[2]='#';sw[2]=130;su[2]='Webmaster Forums';st[2]="";s[2]="" +p+"http://www.searchbliss.com/forum/"+q+a+"Sub 1"+r+"Sub 1"+t +p+"http://www.searchbliss.com/forum/"+q+a+"Sub 2"+r+"Sub 2"+t +p+"http://www.searchbliss.com/forum/"+q+a+"Sub 3"+r+"Sub 3"+t +p+"http://www.searchbliss.com/forum/"+q+a+"Sub 4"+r+"Sub 4"+t ma=m.length if (k==1) {mw2=ml-w; for (i=0; i < ma; i++){document.write("<div id='sb"+i+"' class='mn' style='position: absolute; top:"+(mt+mh)+";left:"+(mw+=w+2)+";width:"+(sw[i]-b)+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'>"+s[i]+"</div>")} for (i=0; i < ma; i++){document.write("<div style='position: absolute; top:"+mt+";left:"+(mw2+=w+2)+";width:"+w+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'><a class='bi'"+g+" href='"+n[i]+q+st[i]+a+su[i]+r+m[i]+t+"</div>")}} else {mw2=mt-mh;mt2=mt-mh+2 for (i=0; i < ma; i++){document.write("<div id='sb"+i+"' class='mn' style='position: absolute; top:"+(mt2+=(mh+1))+";left:"+(ml+w-10)+";width:"+sw[i]+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'>"+s[i]+"</div>")} for (i=0; i < ma; i++){document.write("<div style='position: absolute; top:"+(mw2+=(mh+1))+";left:"+ml+";width:"+w+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'><a class='bi'"+g+" href='"+n[i]+q+st[i]+a+su[i]+r+m[i]+t+"</div>")}} function lib_obj(obj,nest){nest=(!nest) ? "":'document.'+nest+'.';this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj):0;this.css=bw.dom||bw.ie4?this.evnt.style:this.evnt;this.ref=bw.dom||bw.ie4?document:this.css.document;this.x=parseInt(this.css.left)||this.css.pixelLeft||this.evnt.offsetLeft||0;this.y=parseInt(this.css.top)||this.css.pixelTop||this.evnt.offsetTop||0;return this} function lib_doc_size(){this.x=0;this.x2=bw.ie && document.body.offsetWidth-20||innerWidth||0;this.y=0;this.y2=bw.ie && document.body.offsetHeight-5||innerHeight||0;this.x50=this.x2/2;this.y50=this.y2/2;return this;} lib_obj.prototype.showIt = function(){this.css.visibility="visible"} lib_obj.prototype.hideIt = function(){this.css.visibility="hidden"} function libinit(){page=new lib_doc_size();o=new Array();for (i=0; i < ma; i++){o[i]=new lib_obj('sb'+i);o[i].hideIt()}} libinit() //--> </script> </body> </html>
searchbliss is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 02-01-2008, 03:51 PM   #2 (permalink)
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 358
iTrader: 0 / 0%
Latest Blog:
None

Boogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebody
I have IE7 and it works fine for me? Don't know why you're getting the errors- any url fo me to check the ACUTAL one?

Boog's
__________________
Price is what you pay... Value is what you get.
Boogle is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-02-2008, 10:55 AM   #3 (permalink)
v7n Mentor
 
searchbliss's Avatar
 
Join Date: 03-25-06
Posts: 694
iTrader: 1 / 100%
searchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nice
Here's the URL to the code generator. Some are saying that after they generate the code, the example menu show wrong...It doesn't for me with Firefox and IE6. They all claim to have IE7. Thanks Boog's.
http://www.searchbliss.com/webmaster_tools/menu_sub.htm
searchbliss is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-04-2008, 01:07 AM   #4 (permalink)
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 358
iTrader: 0 / 0%
Latest Blog:
None

Boogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebody
Hi Searchbliss,

There was a problem when I created the menu myself:

error: message = 'o' is undefined.

The code i got is:
Code:
<script language="JavaScript"> <!--// var D6=window,Y7=document;function B8(){this.ver=navigator.appVersion;this.agent=navigator.userAgent;this.dom=Y7.getElementById?1:0;this.opera5=this.agent.indexOf("Opera 5")>-1;this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;this.ie4=(Y7.all && !this.dom && !this.opera5)?1:0;this.ie=this.ie4||this.ie5||this.ie6;this.mac=this.agent.indexOf("Mac")>-1;this.ns6=(this.dom && parseInt(this.ver)>=5)?1:0;this.ns4=(Y7.layers && !this.dom)?1:0;this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5);return this}bw=new B8();z=0;b=0;g="";if(bw.opera5||bw.ns6){b=2};if(bw.ie){g=" style='width: 100%'"}else{z=6}mt=10;ml=10;w=150;mh=23;mw=ml-w;k=1;mt=mt-z;p="<a class='mi'"+g+" href='";q="' title='";r="\"; return true' onmouseout='window.status=\"\"; return true'>";t="</a>";a="' onmouseover='window.status=\"";v="<div class=sp></div>" m=new Array();n=new Array();s=new Array();sw=new Array();su=new Array();st=new Array() m[0]='Hello';n[0]='#';sw[0]=150;su[0]='Hello';st[0]="";s[0]="" +p+"http://www.google.co.uk/"+q+a+"1"+r+"1"+t +p+"http://www.google.co.uk/"+q+a+"2"+r+"2"+t +p+"http://www.google.co.uk/"+q+a+"3"+r+"3"+t +p+"http://www.google.co.uk/"+q+a+"4"+r+"4"+t m[1]='';n[1]='#';sw[1]=150;su[1]='';st[1]="";s[1]="" +p+"page.html"+q+a+""+r+""+t +p+"page.html"+q+a+""+r+""+t +p+"page.html"+q+a+""+r+""+t +p+"page.html"+q+a+""+r+""+t m[2]='';n[2]='#';sw[2]=150;su[2]='';st[2]="";s[2]="" +p+"page.html"+q+a+""+r+""+t +p+"page.html"+q+a+""+r+""+t +p+"page.html"+q+a+""+r+""+t +p+"page.html"+q+a+""+r+""+t ma=m.length if (k==1) {mw2=ml-w; for (i=0; i < ma; i++){document.write("<div id='sb"+i+"' class='mn' style='position: absolute; top:"+(mt+mh)+";left:"+(mw+=w+2)+";width:"+(sw[i]-b)+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'>"+s[i]+"</div>")} for (i=0; i < ma; i++){document.write("<div style='position: absolute; top:"+mt+";left:"+(mw2+=w+2)+";width:"+w+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'><a class='bi'"+g+" href='"+n[i]+q+st[i]+a+su[i]+r+m[i]+t+"</div>")}} else {mw2=mt-mh;mt2=mt-mh+2 for (i=0; i < ma; i++){document.write("<div id='sb"+i+"' class='mn' style='position: absolute; top:"+(mt2+=(mh+1))+";left:"+(ml+w-10)+";width:"+sw[i]+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'>"+s[i]+"</div>")} for (i=0; i < ma; i++){document.write("<div style='position: absolute; top:"+(mw2+=(mh+1))+";left:"+ml+";width:"+w+"' onmouseover='o["+i+"].showIt()' onmouseout='o["+i+"].hideIt()'><a class='bi'"+g+" href='"+n[i]+q+st[i]+a+su[i]+r+m[i]+t+"</div>")}} function lib_obj(obj,nest){nest=(!nest) ? "":'document.'+nest+'.';this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj):0;this.css=bw.dom||bw.ie4?this.evnt.style:this.evnt;this.ref=bw.dom||bw.ie4?document:this.css.document;this.x=parseInt(this.css.left)||this.css.pixelLeft||this.evnt.offsetLeft||0;this.y=parseInt(this.css.top)||this.css.pixelTop||this.evnt.offsetTop||0;return this} function lib_doc_size(){this.x=0;this.x2=bw.ie && document.body.offsetWidth-20||innerWidth||0;this.y=0;this.y2=bw.ie && document.body.offsetHeight-5||innerHeight||0;this.x50=this.x2/2;this.y50=this.y2/2;return this;} lib_obj.prototype.showIt = function(){this.css.visibility="visible"} lib_obj.prototype.hideIt = function(){this.css.visibility="hidden"} function libinit(){page=new lib_doc_size();o=new Array();for (i=0; i < ma; i++){o[i]=new lib_obj('sb'+i);o[i].hideIt()}} libinit() //--> </script>
I just post the Jscript because that's where the problem is! I had a quick look though, and even though my Jscript skills aren't too good I don't even see 'o' being used anywhere!?

Boog's
__________________
Price is what you pay... Value is what you get.
Boogle is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-04-2008, 10:50 AM   #5 (permalink)
v7n Mentor
 
searchbliss's Avatar
 
Join Date: 03-25-06
Posts: 694
iTrader: 1 / 100%
searchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nice
Thanks Boog's. I don't know what that error is in reference to either.
searchbliss is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-06-2008, 12:50 PM   #6 (permalink)
v7n Mentor
 
searchbliss's Avatar
 
Join Date: 03-25-06
Posts: 694
iTrader: 1 / 100%
searchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nice
Hey Boog's,
Would you mind trying it again. I think (hope) I found the problem with IE7. Thanks a ton.
http://www.searchbliss.com/webmaster_tools/menu_sub.htm
searchbliss is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-06-2008, 12:54 PM   #7 (permalink)
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 358
iTrader: 0 / 0%
Latest Blog:
None

Boogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebody
Nah sorry mate it's still not looking right- if you want i can upload what it looks like- just let me know?

Boog's
__________________
Price is what you pay... Value is what you get.
Boogle is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-07-2008, 12:11 PM   #8 (permalink)
v7n Mentor
 
searchbliss's Avatar
 
Join Date: 03-25-06
Posts: 694
iTrader: 1 / 100%
searchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nicesearchbliss is just really nice
Quote:
Originally Posted by Boogle View Post
Nah sorry mate it's still not looking right- if you want i can upload what it looks like- just let me know?

Boog's
Yes, that would be great. I jsu can't understand why every version of IE works but 7.
searchbliss is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-07-2008, 01:45 PM   #9 (permalink)
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 358
iTrader: 0 / 0%
Latest Blog:
None

Boogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebody
i'll pm you the link searchbliss
__________________
Price is what you pay... Value is what you get.
Boogle is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScript FireFox problem searchbliss Coding Forum 0 12-27-2007 11:58 AM
Google's China Problem (and China's Google Problem) - NYTimes Sunday Mag (4/23/06) Julie Google Forum 3 09-18-2007 01:00 AM
PROBLEM WITH JAVASCRIPT MENU fake$ Coding Forum 5 06-22-2006 05:14 AM
Count-up from a particular year + Javascript within Javascript? Help! Azam.biz Coding Forum 3 06-06-2005 06:47 AM
JavaScript XML problem on Firefox DragonEye Coding Forum 3 03-26-2005 01:48 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 07:13 AM.
© Copyright 2008 V7 Inc


Search Engine Optimization by vBSEO 3.1.0 ©2007, Crawlability, Inc.