Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

(NS/Non-IE Problem) OnMouseOver and Sizing syntaxes

Status
Not open for further replies.

Karl Blessing

Programmer
Feb 25, 2000
2,936
US
If you go on my site and notice the menu on the left side, (btw it's actually 2 different pages, if you are in IE it'll do menu.asp, anything else it'll do ns_menu.asp) I got it looking good for opera, but netscape has a sizing issue, the header bars (or combo of 3 tables) are too tall. I want the non-IE menu to behave like the one I have made, I want to be able to figure out on a client-side perspective, how I can make the background color of a table cell or row change when I mouseover it. ( I want to be able to do this in both Opera and Netscape )

you'll probally notice I use hyperlinks for NS but not for Opera and IE, mainly because NS is the only one I have found thus far that doesnt support onclick-event for table cells, netscape also cannot have table cell background color, however it does seem to support Table row background color.

I am not aiming to have the menus slide or anything like that, since I already have it just reloading the frame in a Non-IE browser, for the onclicks, I just want to be able to make the size and looks just as close to my IE version as possible, and also to have the background color of the items change when mouse over, just like they do in IE.

Can anyone help? you can view the source, I have it formated out(indented) pretty well to follow. Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
write a differnt function for each browser:

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!-- Begin
if(nn4) { function goes here }
if(nn5) { function goes here }
if(nn4 || nn6) { function goes here }
if(ie4 || ie5) { function goes here }
// End -->
</script>

The function could be a simple location.href or what ever it takes to make your menu display like you want it to in each browser.

Hope this helps,
Bob

 
I'm sorry, but I dont know if you even read the whole thing, I already have it set up to determine browsers, I just need to know that &quot;Function goes here&quot; portion of the code, like WHAT do I type to make it do in non-IE what I just described. Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
I know this isn't the answer you're looking for, but to make it as browser-friendly as possible I'd recommend using images...

As far as I know, the only way you'll be able to do what you want with html in NN4 is by using layers. Which means you'll have to code seperately for NN4 and NN6.

If you're interested in seeing a poorly-coded example of changing the background color for a div in a layer in NN4 let me know and I'll post it here...

Sorry I couldn't be more help.
 
I would like to avoid changing the structure, I know Netscape supports bgcolor in <TR> so how do I get it that if I do a mouseover on that row that it's bgcolor will change? as an example of what I am looking for.

I dont see how using images will help me at all, I Already use images for the top/bottom of the main catagory buttons. I just want the bgcolor for the rows to change when I mouse over them.

I also want to fix the height of the main buttons in NS ( this problem doesnt appear in Opera) Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
I really don't know if you can dynamically change the bgcolor of a <tr> in Netscape...I'll see if I can figure anything out.

Images would help because they would be the same size in every browser and you could do a simple javascript rollover to change the background color.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top