View Full Version : Can a script work on a layer with overflow:scroll?

12-24-2008, 05:47 AM
1) Script Title: All Levels Navigational Menu (v2.0)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/index.htm

3) Describe problem: Can anyone tell me if it is possible to make a script function while being used on a layer with overflow: scroll?

I have a layer that can scroll on a fixed page. On the layer I want to have a button that when clicked will expand a menu.
I already have this set up on the fixed page but want to set the same function to work on the layer that is scrollable.

I have tried using a tooltip script as well: 'Fixed Tooltip script'

and I have also tried using: AnyLink Drop Down Menu

No matter what I use I cannot make a javascript function from the scrollable layer.

At the moment I have installed: 'Drop down menu w/ description'
on the scrollable layer and it works with the code inserted on the layer itself.

If I try to insert the javascript code for the other scripts on the layer itself, it doesn't work.
The resulting effect is that the screen jumps (either the fixed page or scrollable layer) and inserts a horizontal scroll bar when viewed on the browser or nothing happens at all.

Unfortunately the 'Drop down menu w/description' doesn't serve the same purpose of the drop down menu that returns to its original state when the user takes their mouse away from the button.

If anyone can tell me how it may be possible to make a java script such as
All Levels Navigational Menu (v2.0) work this way or at least confirm for me that it is impossible, I would be grateful.

If you want to look at the page on my site, the url is:
http://www.lotstoshopforcash.com/Test page.htm

Thank you.:confused:

12-24-2008, 05:58 AM
Other than conceptually, there is no such thing as a layer in modern HTML code. That is to say that, at one time there were actual layer, and even ilayer tags. Both have long since been deprecated, and then totally abandoned.

So, we are left with conceptually, which basically means - what do you mean? Are you talking about a division, an iframe, imported content, what?

Generally anything that can be done in javascript under basic circumstances, can be done under more complex circumstances - as long as all of the resources are on the same domain. Though, where more than one script is concerned, sometimes the conflicts are too complex to qualify for the sort of free help we offer here.

That said, if you could link to the page on your site where you are having a problem, and make clear what exactly you want to have happen, as well as what is happening instead, and what we would have to do to see the problem, then we would have a good chance of helping you to resolve it.

12-24-2008, 06:02 AM
Sorry, you must have seen the post before I went back to modify it and added a link to the page in question.

12-24-2008, 06:04 AM
I forgot to mention I also tried using the script: 'Dropdown HTML control'

12-24-2008, 06:23 AM
In simple terms, I only want to use the one script which is:
All Levels Navigational Menu (v2.0)

(already on the page.)

I have used Dreamweaver to insert layers on my page.
When you look at my site:
http://www.lotstoshopforcash.com/Test page.htm

You will see a scrollbar on the page that controls a scrollable layer that scrolls vertically.

I want to install a button (like those already on the non-scrollable page) on the scrollable layer that will open a menu when the user clicks on the button.

At the moment if I try to do so by installing the button image with the relevant code:

<li><a href="#" rel="ddsubmenuside2"><img src="http://www.lotstoshopforcash.com/images/Products on this site button_0.png" onmouseover="this.src='/images/Products on this site button_1.png';" onmouseout="this.src='/images/Products on this site button_0.png';" border="0" ></a></li>

The on-click event does not seem to reference the ddlevelsmenu.js file.

All that seems to happen when I try this is that the browser window has a jump effect visually and the page re-sizes vertically so that it is longer.

If I try to place the code:

<div id="ddsidemenubar" class="markermenu">
inside the layer id then the page content changes so that you can only see the "scrollable layer" and the fixed part of the page itself does not appear.

The code for the layer that I want this to function on is:

<div id="Layer10" style="position:absolute; width:771px; height:210px; z-index:11; left: 247px; top: 313px; overflow: auto; visibility: visible;">