Jump to content

Yet another "open window" question!


g2thelow

Recommended Posts

I'm stumped! I've been using this bit of code to generate pop-up windows for my "breaking news" pages. The problem is is that there is no way to resize the page using this code (becomes a problem when you have a link on the page). I've tried a number of different things, but first off here's the code:

 

(the code in question by itself)

<a href="javascript:Open(\'quickrelease.php?display_id='.$qr_arr[$i]["display_id"].'\',575,600,1);">

 

(here it is in context)

$i=0;

while ($i<count($qr_arr)){

if (!$qr_arr[$i]["heading"]){

$heading = date("F j, Y", strtotime($qr_arr[$i]["date"]));

} else {

$heading = $qr_arr[$i]["heading"];

}

echo '<p class="qrtable"><strong><font color="#000000">'.$heading.'<br>

              </font><a href="javascript:Open(\'quickrelease.php?display_id='.$qr_arr[$i]["display_id"].'\',575,600,1);">'.$qr_arr[$i]["title"].'</a></strong></p>';

$i++;

}

 

I tried substituting a few different tags, such as <a href="#" onclick="window.open.... and was able to get it to work--only no scrollbars or resize, etc. I hope I'm making some sort of sense here. I spent about 3 hours searching the web and another 1 or 2 on this forum (actually found answers to different questions I had, which was cool). Figured I'd break down and ask for help. Thanks everybody!

Link to comment
https://forums.phpfreaks.com/topic/88633-yet-another-open-window-question/
Share on other sites

Something like so:

 

<script type="text/javascript">
function loadWindow(){
            var load = window.open('/my/window/url/here.php', ' ', 'scrollbars=no,menubar=no,height=200,width=300,resizable=yes,toolbar=no,location=no,status=no');
} 
</script>

<a href="javascript:loadWindow();">Open Me!</a>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.