PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 7th, 2013, 06:45 AM
sunny_onyi sunny_onyi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2013
Posts: 7 sunny_onyi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 8 sec
Reputation Power: 0
How to display a page as a popup window

How to display a web page as a popup window without all the bars (menu bar,address bar,etc) when you click on the input type submit button using php code or combining with javascript.help pls

Reply With Quote
  #2  
Old March 7th, 2013, 06:58 AM
gw1500se gw1500se is online now
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jul 2003
Posts: 2,876 gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Year 1 Week 6 Days 20 h 22 m 52 sec
Reputation Power: 581
A popup is not done with PHP per se since it is server side. There are a couple of way to do popups. One is with Javascript and window.open. The other is an HTML <a> tag (which could have an href to a PHP script) using the 'target=_blank' attribute. The latter requires a mouse click while the former can be done with any type of Javascript trigger. As for what menus are displayed, that is controlled by the browser. You may be able to suppress them with Javascript's window.open settings parameters but most browsers ignore that anyway unless permitted by the user settings. It is very difficult to override browser settings with Javascript and even harder with PHP/HTML. It is mostly a matter of security.
__________________
There are 10 kinds of people in the world. Those that understand binary and those that don't.

Last edited by gw1500se : March 7th, 2013 at 07:06 AM.

Reply With Quote
  #3  
Old March 7th, 2013, 07:20 AM
Northie's Avatar
Northie Northie is offline
Square Peg in a Round Hole
Click here for more information.
 
Join Date: Oct 2007
Location: North Yorkshire, UK
Posts: 3,416 Northie User rank is General 43rd Grade (Above 100000 Reputation Level)Northie User rank is General 43rd Grade (Above 100000 Reputation Level)Northie User rank is General 43rd Grade (Above 100000 Reputation Level)Northie User rank is General 43rd Grade (Above 100000 Reputation Level)Northie User rank is General 43rd Grade (Above 100000 Reputation Level)Northie User rank is General 43rd Grade (Above 100000 Reputation Level)Northie User rank is General 43rd Grade (Above 100000 Reputation Level)Northie User rank is General 43rd Grade (Above 100000 Reputation Level)Northie User rank is General 43rd Grade (Above 100000 Reputation Level)Northie User rank is General 43rd Grade (Above 100000 Reputation Level)Northie User rank is General 43rd Grade (Above 100000 Reputation Level)Northie User rank is General 43rd Grade (Above 100000 Reputation Level)Northie User rank is General 43rd Grade (Above 100000 Reputation Level)Northie User rank is General 43rd Grade (Above 100000 Reputation Level)Northie User rank is General 43rd Grade (Above 100000 Reputation Level)Northie User rank is General 43rd Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 9 h 44 m 4 sec
Reputation Power: 3835
popups can be blocked with a popup blocker

more elegant are iframed modal boxes (eg jquery iframe modal window)

That's the javascript sorted

Onto the PHP

code your php page up to take an optional URL argument which then only creates the middle part of your page (eg without headers and footers)

then for example, consider this:

/page.php?iframed=yes

PHP Code:
<?php
$full 
true;

if(
$_GET['iframed'] =='yes') {
     
$full false;
}

?>
<html>
    <head>
        .....
    </head>
    <body>
        <?php if($full) { ?>
            <div id='header'>
                ....
            </div>
        <?php ?>

        ....
        
        <?php if($full) { ?>
            <div id='footer'>
                ....
            </div>
        <?php ?>
    </body>
</html>
__________________
PHP OOPS! <?php DB::Execute(SQL::makeFrom($_GET))->fetchArray()->FormatWith(Template::getInstance('default'))->printHtml(); ?>

PDO vs mysql_* functions: Find a Migration Guide Here

[ Xeneco - T'interweb Development ] - [ Are you a Help Vampire? ] - [ Read The manual! ] - [ W3 methods - GET, POST, etc ] - [ Web Design Hell ]

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > How to display a page as a popup window

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap