make the link open in a pop-up

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
melindaSA
Forum Commoner
Posts: 99
Joined: Thu Oct 02, 2003 7:34 am

make the link open in a pop-up

Post by melindaSA »

I hope someone can help me with this:

I would like to have the link open in a pop-up (without top menu), the link is stored in the database. Here is what works to open in a new browser window using _blank, but the top menu is still showing:

Code: Select all

if ($courses['course_outline']) {
    echo '<p><span class="inlineGray">Course Outline:&nbsp;&nbsp;</span><a href="'.$courses['course_outline'].'" target="_blank">Click Here</a></p>';
    }
I have tried to do the following, which does not work:

Code: Select all

<a href="javascript:void(0);" onclick="window.open('.$courses['course_outline'].','PageName','location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=630,height=400')">
Any help would be appreciated!!
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

try these for the options:

Code: Select all

toolbar=no,location=no,directories=no,
status=no,menubar=no,scrollbars=no,resizable=no
What are you using IE7 Sometimes will just show the URL of the script and some stuff (for me). It's kinda weird.
melindaSA
Forum Commoner
Posts: 99
Joined: Thu Oct 02, 2003 7:34 am

Post by melindaSA »

Hi techtalk, still cannot get it to work! Thank you for your help!

Does anyone else know how to fix this?
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Code: Select all

<a href="$courses['course_outline']" onclick="window.open('this.href','PageName','location=0,status=0,toolbar=0,menubar=0,scrollbars=1,resizable=1,width=630,height=400'); return false;">
This should also just show your url in the status bar when they hover over it.
Post Reply