Forum Moderators: open

Message Too Old, No Replies

Multiple scripts

         

jwbradshaw

9:09 pm on Mar 16, 2009 (gmt 0)

10+ Year Member



I'm currently working on a site that has two different javascripts in the code. One is for a stock ticker, the other is for a drop down menu. Whenever I mouse-over one of the links that has a drop down menu, the stock ticker disappears. Is there anyway to prevent this? Here is what my <head> and <body> areas look like.

<head>
<script type="text/javascript" src="ddlevelsmenu.js">
</script>
</head>

<body>
<!-- This is stock ticker-->
<script LANGUAGE='JavaScript' type='text/javascript' src='http://www.someoffsiteurl/EXk_MarketUpdate_US.js'></script>
<script LANGUAGE='JavaScript' type='text/javascript'>
document.writeln(EXk_MarketUpdate_US('',550,'E8E8E8','yes','808080','Arial',12));
</script>

<!--This is drop down menu-->
<a href="test.htm" rel="ddsubmenu1">Test1</a>

<script type="text/javascript">
ddlevelsmenu.setup("nav", "topbar")
</script>

<!--This list is hidden until above link is moused-over-->
<ul id="ddsubmenu1" class="ddsubmenustyle"><li><a href="products/investment.htm">Investment Services</a></li>
<li><a href="products/retirement.htm">Retirement Planning</a></li>
<li><a href="sample1.htm">sample1</a></li>
<li><a href="sample2.htm">sample2</a></li>
<li><a href="sample3.htm">sample3</a></li></ul>

jwbradshaw

8:10 pm on Mar 18, 2009 (gmt 0)

10+ Year Member



Anyone have an idea?

coopster

11:52 am on Mar 19, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, jwbradshaw.

I'm guessing that perhaps the JavaScript has redefined anchor elements with href attributes to behave differently when an event occurs.

Fotiman

12:59 pm on Mar 19, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Another guess... perhaps there is some absolute positioning being applied and when you mouse over the menu items they have a higher z-index value than the stock ticker and "cover" it? Just a guess.

jwbradshaw

2:52 pm on Mar 19, 2009 (gmt 0)

10+ Year Member



Thanks for the tips! The javascript dropdown menu I used is also controlled by CSS and it appears that there is some absolute positioning using a z-index value that was causing the issue. I removed the absolute positioning and z-index value from a class selector called '.ddiframeshim'

Now, I just need to figure out what this iframe shim does.

Thanks!

Fotiman

3:28 pm on Mar 19, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



An iframe shim is placed under absolutely positioned items because in IE6 <select> elements would show through. That is, if you have a box positioned on top of an area that contained a <select> element, the <select> element would not be covered. The fix for this bug was to place an iframe "shim" between the 2 layers, which prevented the <select> element from showing through.

Note, I *think* this was fixed in IE7... but I forget.

jwbradshaw

5:50 pm on Mar 19, 2009 (gmt 0)

10+ Year Member



Ah I see. Thank you very much for the info.