FORUMS: list search recent posts

opening up a web page as a (pop-up) window

COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
opening up a web page as a (pop-up) window
on Sep 28, 2007 at 1:57:16 pm


I added a music link to one of my webpages:


When clicked it opens the music link as a whole new page and takes the user away from my own, which is not what i want.

What I'd like to do is open the page as a pop-up window, retaining my web page as the main page displayed.

Or perhaps if not illegal, to put the music player itself into my page, if that is even possible?

This is where the link in my web page goes to:

Thank you!
Debra Cohen

Return to posts index

Re: opening up a web page as a (pop-up) window
on Sep 28, 2007 at 3:18:18 pm

Hey Debra,

I use a little function that is a javascript and opens up a new window - then you point the target of the link to that new window. - here's the script

<script language="JavaScript" type="text/JavaScript">
function nWindow (w,h)
NWin ="", "NW", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width="+w+",height="+h);

Then on your link you need to add

onclick="nWindow(400,400);" target="NW"

400,400 should be the width,height that you want - and make sure you change your target from _blank or whatever you have it now to NW.


Return to posts index

Re: opening up a web page as a (pop-up) window
on Sep 30, 2007 at 2:56:06 am

Thanks Abraham for the script and pointing me in the direction I need to go!

I'm starting to implement it but my Javascript knowledge is fairly (or very) minimal..

To start, do I replace "NW" in your script with the link that I'm trying to open?


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved