Moving Div layers

This time with div layers, I was looking to have them move. On the Meet DDA page in development, there is a div that will be displaying the large image or play the large video, depending on which employee’s profile picture is being looked at.

I will need this div with the flash piece in it to move up or down based on which image it is displaying content for. There are several rows of worker pictures to deal with. I added this y-value detail into the XML that is being used to select which picture or video is shown so that in the flash, in the on rollover function, I can call the Javascript function I made in the HTML page with a simple get URL function.

The Javascript function itself has several problems to overcome, which of course are due to all the different browsers interpreting code in different ways. So you have to start off by determining what browser the visitor is using. After that is determined, you can alter your Javascript code to accommodate every browser.

The final line to change the y-value of the div is: document.poppedLayer.style.top = ypos; …where poppedLayer is a variable that holds the varying browser specific code, and where ypos is a variable that holds the number of the new y-value. This isn’t a gradual moving method, it is an instant one and it seems to be working like a charm.