For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > March 2006 > AW: [PEAR] QF changing target of a Form at runtime









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author AW: [PEAR] QF changing target of a Form at runtime
Webmaster@lindworm.de

2006-03-29, 7:59 am

Hello,

thank you Justin, I thought about something like this, but I do not find =
a
documentation how to change the target. Do you have a code snippet ?

Gretings
Mirco

-----Urspr=FCngliche Nachricht-----
Von: Justin Patrin [mailto:papercrane@gmail.com]=20
Gesendet: Mittwoch, 29. M=E4rz 2006 01:51
An: Webmaster@lindworm.de
Cc: pear-general@lists.php.net
Betreff: Re: [PEAR] QF changing target of a Form at runtime

On 3/28/06, Webmaster@lindworm.de <webmaster@lindworm.de> wrote:
> Hello,
> I might have a problem that is not easy to understand.
>
> I have a QF page with about 30 different input fields and 4 different =

send
> buttons.
>
> 3 of those buttons should be sended to the same page wich is no =

problem at
> all, also the different states of the buttons are easy to handle.
>
> The 4th button should send the data to the same page, but it should =

open a
> popup after sending.
> I did those by calling a jscript (window.open) after processing the =

data.
> The big problem is that because of popupblockers we gt more and more

support
> trouble.
>
> I now wonder if I can solve this issue with a little javascript wich =

is
> called by the sending button.
> This javascript should edit the target tag of the form to _blank, so =

the
> Browser itself starts an new Window.
>
> Is that solution possible? Or do you know a better ? How can the send

button
> call the jscript?
>
>


Just add an onClick for the button which changes the target and then
calls the form's onSubmit.

--
Justin Patrin

--=20
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Maarten Bremer

2006-03-29, 7:00 pm

> thank you Justin, I thought about something like this, but I do not find a
> documentation how to change the target. Do you have a code snippet ?


onSubmit="document.theformyouhave.target = 'target'>

Please carefull consider the use of creating new windows. Popup blockers
aren't there for nothing, popups are very irritating.

Normally it isn't needed to use popups at all.

Kind regards,

Maarten
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com