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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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