Re: [PHP] Re: Open form in new window

[email protected] ("Terry Ally (Gmail)")
Newsgroups php.general
Message-ID <CAERG8k0y4PCtnnepEZGufz0jj5dNZsEs0t4sXwBYaAbw9pJJVg@mail.gmail.com>
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 <[email protected]>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?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.