southbeach
Programmer
Working on a page where I display a table grid. One of the options on the grid is to play a sound track. As of now, I got it to work fine but I am placing the MP3 player once for every possible sound track on the page.
I want to change this. I want to provide an image and apply the following
1. When PLAY image is clicked, swap image to STOP image
2. Call AJAX+PHP script to open MP3 player
3. MP3 player should open just below the row where the PLAY image was clicked
I have no problem with 1 and 2. I figure I need X and Y coordinates of the PLAY image so that I can open a LAYER or CONTAINER using absolute positioning.
This brings me to the next question
1. How do I change the style properties on the LAYER so that it is placed according to the captured X.Y coordinates?
The container will have a fixed ID
the top: and left: or margin: properties will need to change dynamically.
Any ideas?
Thank you all in advance for your assistance!
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
I want to change this. I want to provide an image and apply the following
1. When PLAY image is clicked, swap image to STOP image
2. Call AJAX+PHP script to open MP3 player
3. MP3 player should open just below the row where the PLAY image was clicked
I have no problem with 1 and 2. I figure I need X and Y coordinates of the PLAY image so that I can open a LAYER or CONTAINER using absolute positioning.
This brings me to the next question
1. How do I change the style properties on the LAYER so that it is placed according to the captured X.Y coordinates?
The container will have a fixed ID
Code:
<div id="trackplayer"></div>
<style>
div#trackplayer {
position: absolute;
z-index: 20;
}
the top: and left: or margin: properties will need to change dynamically.
Any ideas?
Thank you all in advance for your assistance!
--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.