I'm sorry but I cant seem to make it work.

The form instruction is now:

                    <form method="get" onSubmit="submitonce(this)">

The Button Instruction is now:

<input type="Button" value="Enviar" style="background-color: #E9B361"
onClick="document.forms[1].submit();window.open('php/encuesta.php','1','
scrollbars=0,width=300,height=340,top=150,left=150');return true">
                       
Still when the new window opens is stops cause it does not have any
values with it.

What am I doing wrong here, if I add an action statement in the form,
then it opens the php procedure in the same window an works. If I add a
_blank target it also works, but the new window never works.

Thanks.



-----Mensaje original-----
De: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] 
Enviado el: Sábado, 16 de Febrero de 2002 21:51
Para: webmaster mbtradingco
CC: [EMAIL PROTECTED]
Asunto: Re: [PHP] Help please

You should make up your mind - do you want to use the form in order to 
carry the data (use submit()) or do you want to submit the data via URL 
(GET method - using window.open()). You can't use both!

Bogdan

webmaster mbtradingco wrote:

>Thanks... I hope you can assist me a little more.
>
> 
>
>I put the text like this: 
>
> 
>
>                            <input type="Button" value="Enviar"
>style="background-color: #E9B361"
>onClick="window.open('php/encuesta.php','1','scrollbars=0,width=300,hei
g
>ht=340,top=150,left=150',document.forms[0].submit());return true">
>
> 
>
>but it opens the new window (like it is supposed but it carries no
>data), and the main window changes like if no value was added. This is
>the third consecutive form in the page, and the form header is like
>this.
>
>
>
>                    <form method="POST"  action="php/encuesta.php"
>target="_blank" onSubmit="submitonce(this)" name="poll">
>
> 
>
>where submitonce(this) is a function that disables the button after one
>submission is made.
>
> 
>
>Help please.
>
> 
>
>Thanks
>
> 
>
>The site is www.papelesdeviaje.com <http://www.papelesdeviaje.com/>
and
>is the poll in question. You can access below the enviar, and see what
I
>need the submit button to do.
>
> 
>
>Thanks.
>
> 
>
> 
>
>-----Mensaje original-----
>De: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] 
>Enviado el: Sábado, 16 de Febrero de 2002 20:43
>Para: webmaster mbtradingco
>CC: [EMAIL PROTECTED]
>Asunto: Re: [PHP] Help please
>
> 
>
>Since you're assuming Javascript anyway, you can use a <input
>type="button"> instead of <input type="submit"> and use the same
>javascript code as for the <a href>, just that you append a
>"document.forms[0].submit()".
>
>HTH
>
>Bogdan
>
>webmaster mbtradingco wrote:
>
>
>
>I'm trying to contro l the way a new window opens when submiting a
form.
>
> 
>
>When I do it fro m a regular button, I use:
>
> 
>
><p align="center"> <a href="#pv"
>onClick="window.open('php/resulta.php','1','sc
>rollbars=0,width=300,height=340,top=150,left=150');return true">
>
> 
>
>and it works, it opens the new window, but I'm not transferring any
>values in here.
>
> 
>
>What I want to do is that when I push the submit button of a form, it
>opens in the same window size as the prior example. I hope you can
>assist me.
>
> 
>
>E.
>
> 
>
>




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to