Re: Re: Open form in new window
| From: | Gmail) | Date: | Mon, 04 Mar 2013 08:32:45 +0000 |
| Subject: | Re: Re: Open form in new window | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320379@lists.php.net to get a copy of this message | ||
You could echo HTML code e.g.
<form action="result.php" method="post">
Number: <input id="quantity" type="text" />
*<button type="button" onclick="OpenWindow()">Submit</button>*
</form>
or include it as one of your form attributes:
*<form action="demo_form.asp" method="get" target="_blank">*
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<input type="submit" value="Submit">
</form>
On 4 March 2013 07:16, Maciek Sokolewicz <maciek.sokolewicz@gmail.com>wrote:
> On 4-3-2013 6:44, John Taylor-Johnston wrote:
>
>> I have many different submit button.
>> <input value="Update" type="submit">
>> <input name="DPRmode" value="Enter Data" type="submit">
>>
>> When php processes value="Enter Data", I would like to open a new
>> window, but only if I click this one.
>>
>> Possible? I knw ther is an HTML target="" thingy. Can PHP do anything
>> magic?
>>
>> No, it can't. PHP is a *serverside* language, while opening a new window
> is fully *clientside*. You could, after recieving the form submission, send
> back a redirect which opens in a new window; but far easier would be to use
> javascript which would open a new window on submission instead.
>
> PHP is definitly the wrong choice for things like opening browser windows.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
*Terry Ally*
Twitter.com/terryally
Facebook.com/terryally
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
To print or not to print this email is the environmentally-searching
question!
Which has the highest ecological cost? A sheet of paper or constantly
switching on your computer and connecting to the Internet to read your
email?