Re: how to use QuickForm button to open new window in Javascript?
| From: | Justin Patrin | Date: | Sun, 31 Jul 2005 19:14:04 +0000 |
| Subject: | Re: how to use QuickForm button to open new window in Javascript? | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20194@lists.php.net to get a copy of this message | ||
On 7/31/05, l Burnerheimerton <lburnerheimerton@yahoo.com> wrote:
> I've used the following code to try to get this to
> work - I want the button to open a new window with the
> parameters given.
>
> This works with a HTML element if I add the javascript
> there.
>
> $buttons[] = &HTML_QuickForm::createElement('button',
> 'ibutTest', 'Try putting open window here',
> array('onClick' => "window.open(\'page3.php?i=\' +
> document.getElementById(\'selectionMenu\').selectedIndex)"));
> $form->addGroup($buttons, null, null, '',
> false);
>
> Any ideas are appreciated - or if there are better
> ways to do this...
>
Nope, this is the way to do it.
--
Justin Patrin