![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Apr 2008
Posts: 5
OS: Windows Vista Service Pack 1 (32 bit)
|
PHP new browser window ?
Hi,
I have a PHP page of the following structure : if(condition is true) { echo "<html><--HTML Block1--></html>"; } else { //condition is false echo "<html><--HTML Block2--></html>"; } I basically want the HTML Block1 to open up in the same browser window but HTML Block2 to open up in a new tab/window when the script is executed (the script is called by clicking on the "Submit Form" button of a webpage). Is this possible with PHP ? Tried to google.. no help :( Thanx in advance... |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Cymru am byth
|
Re: PHP new browser window ?
Make HTML Block2 its own file, and throw in this javascript.
Code:
<script type="text/javascript">
window.open('URL of HTML Block2');
</script>
Keep in mind too that firefox will block that new window javascript unless you put it in a button of some kind to prevent pop ups, but you said its a "Submit Form" button, so you should be just fine.
__________________
Living with Louie dog's the only way to stay sane _____________________________________________ ... and with those words so begins my lifetime of longing for the devil's warm embrace |
|
|
|
|
|
#3 (permalink) | |
|
Registered User
Join Date: Apr 2008
Posts: 5
OS: Windows Vista Service Pack 1 (32 bit)
|
Re: PHP new browser window ?
Quote:
Thanx for the response. But I have another concern. The "Submit" button of mine is getting some form data from the previous HTML page which is being processed by this PHP and displayed in HTML tables. If I create a different html file for the Block2, then I'll need to figure out some way of passing all these form values to that new page. Woudln't that be too cumbersome ? Cheers... |
|
|
|
|
|
|
#4 (permalink) |
|
Cymru am byth
|
Re: PHP new browser window ?
It may be, but I know of no way to get php to open up a new window.
__________________
Living with Louie dog's the only way to stay sane _____________________________________________ ... and with those words so begins my lifetime of longing for the devil's warm embrace |
|
|
|
![]() |
| Thread Tools | |
|
|