Computer Hope

Internet & Networking => Web design => Topic started by: d-boy22 on June 29, 2007, 07:17:08 PM

Title: !!---how to make a pop up window---!!
Post by: d-boy22 on June 29, 2007, 07:17:08 PM
ok now, i have some music i want to play on the site. but if i just put it on the site the music has to reload every time you click on a link, and it starts from the beginin of the song. i want a pop-up window to pop up and play the music and because its in a diffrent window the music wont reload. but i dont want to have to click on a link atomaticly, i want a pop up window that pops up atomaticlly.
Title: Re: !!---how to make a pop up window---!!
Post by: michaewlewis on June 29, 2007, 10:29:00 PM
Code: [Select]
<body onload=javascript:window.open(newpage.html, null, height=200,width=400,status=yes,toolbar=no,menubar=no,location=no)You should know that this won't work with most browsers because most people have popup blockers turned on.
Another option is to change the onload to onclick, that way if the user clicks anything on the page, the window will pop up.
That's how you can do it. But personally, I wouldn't recommend adding background music to your site because I find background music very annoying. A lot of times I'm already listening to my own music and I don't want something trying to overpower it. When that happens, I commonly close that website and remember not to go to it again.
Title: Re: !!---how to make a pop up window---!!
Post by: d-boy22 on June 29, 2007, 10:40:36 PM
well im not advertising it or anything so ill take it, its a socom clan website soo i dont know ill ask them if they like it