Jump to content

go to new page on when song is done....?


zhahaman2001

Recommended Posts

ok i have a page that has a song on it

[code]
<embed volume=100 src=song1.mp3 width=300 height=45 autostart=true loop=FALSE></embed>
[/code]

and i want it so when the song is done playing (it got to the end) that it loads a new page (in the same window) ......so this page is song.php and when the song is done i want it to go to song.php?songdone=true how would i do that ?
Link to comment
Share on other sites

my best suggestion is that you open the song in a player, find out EXACTLY how many seconds long it is, then use a window.location = song.php function to redirect the page, and set the body to onload=setTimeOut(xxxx('redirect()'), xxxx being the time(in milliseconds) of the song. This is done using javascript, btw
Link to comment
Share on other sites

well, with my method, you could make a javascript counter or something that counts down or up until the end of the song, when the user presses the 'pause' button, have the counter stop also. once the counter hits a certain number(the end of the song), have it go to the new page.

By the way, if you wanna find out the song exact song length, just convert the file type of the song to .WAV, and open it up in the sound recorder program.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.