Link to home
Start Free TrialLog in
Avatar of charlie324
charlie324

asked on

Javascript pop-up window

Hello Experts
I am currently showing a audio file on the webpage in the popup window, using he following
statement
<a href="http://www.chapdav.com/octagonmedia/babies_go/samples/babies_go_beatles_preview/13_norwegian_wood_preview.mp3" onclick="window.open(this.href,'Name a Star','resizable=yes,location=no,location=0,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=300,height=100,status'); return false">Pray</a>

Is there anyway I can make the popup appear in the center of the page, and also remove the address bar?

I have tried but its not working as desired.

Please advise
Thanks
ASKER CERTIFIED SOLUTION
Avatar of mayank_joshi
mayank_joshi
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

As far as address bar is concerned there is no problem  in your code. The problem is security concerns. If people could hide the address bar, people would be able to recreate login pages such as Paypal and people would be tricked into logging into them and giving a malicious hacker their password.

As a result, most of the latest browsers dont allow hiding the location bar, although in some browsers, setting location=no will disable the address bar from being modified.
Do u want to add it as a layer to a same page? It can be done using a combination of css and javascript