Jump to content

popup window from button


Curator

Recommended Posts

I want the action from a button to open up another page when clicked, instead of opening up viewquestions in a small 630,330 popup window.

 

getinfo.php is the popup with 630,330

 

It contains the code below that sends me to viewquestion. 

 

$template -> assign_block_vars('user.info', array('C_INFO' => '<input type="hidden" name="action" value="viewquestions"><input type="submit" value="View">', 'C_INPUT' => ''));

currently viewquestion opens up as 630,330 as well, which is too small.

 

I would rather it open up at 800 600 at least.  Trying to find a way to change the behavior so when the button is clicked it opens up viewquestions with a larger screen.

Link to comment
https://forums.phpfreaks.com/topic/73332-popup-window-from-button/
Share on other sites

Let me rephrase this. 

 

Here is code done by the previous developer for calling a popup window with a link.

 

$template -> assign_block_vars('quiz.info.options', array('NAME' => ' Review ', 'VALUE' => 'javascript:popUp(\''.append_sid('review.php?ARG1='.$cid.'&ARG2='.$row['quiz_id'].'&set='.$rowqs['set_id']).'\', 1400, 850, 1, 1)'));

 

It is passing in 1400, 850 as the window size.

 

I want to do the same thing but use a button instead.

 

Right now my button code is this.

 

$template -> assign_block_vars('user.info', array('C_INFO' => '<input type="hidden" name="action" value="viewquestions"><input type="submit" value="View">', 'C_INPUT' => ''));

 

I would like to open a new window at 1400 by 850.  At least something larger than 630 by 330.

 

I realize this is done in javascript, but I need help in coding the php to properly call the javascript popup with the correct syntax.

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.