| | |
Disable address bar in mozilla, chrome???
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2009
Posts: 83
Reputation:
Solved Threads: 7
hi frnd...
i want to remove/disable ADDRESS BAR from the new pop up window...
now i m using this code....its working only for IE6.....
Also i want to remove expand button in browser...plz tell me how can i do it...
Thanks in advance...
i want to remove/disable ADDRESS BAR from the new pop up window...
now i m using this code....its working only for IE6.....
PHP Syntax (Toggle Plain Text)
window.open(url ,'title', 'location=1,menubar=no,resizable=no,scrollbars=no,status=no ,toolbar=no,width=300,height=200')
Also i want to remove expand button in browser...plz tell me how can i do it...
Thanks in advance...
0
#2 Nov 7th, 2009
Hey.
You only have very limited control over stuff like this, which is how it should be. Your code should not be able to mess up user-chosen browser settings, like the ability to see the menu bar.
Users generally don't appreciate when websites mess up their browser ;-)
Buuut. If there is a way, it would be done using Javascript, not PHP.
If you want to display a popup window, and you want to be able to control how it is displayed, I would recommend trying a CSS solution.
You could put a absolutely positioned <div> on top of your main site, displaying the popup content.
For example:
You only have very limited control over stuff like this, which is how it should be. Your code should not be able to mess up user-chosen browser settings, like the ability to see the menu bar.
Users generally don't appreciate when websites mess up their browser ;-)
Buuut. If there is a way, it would be done using Javascript, not PHP.
If you want to display a popup window, and you want to be able to control how it is displayed, I would recommend trying a CSS solution.
You could put a absolutely positioned <div> on top of your main site, displaying the popup content.
For example:
html Syntax (Toggle Plain Text)
<!DOCTYPE html> <html> <head> <title>Test</title> <style type="text/css"> #PopupOverlay { display: none; position: fixed; left: 0px; right: 0px; top: 0px; bottom: 0px; background-color: #000000; opacity:.75; } #PopupWindow { display: none; position: absolute; width: 350px; height: 150px; left: 50%; top: 50%; margin: -75px 0 0 -175px; border: solid 2px #cccccc; background-color: #ffffff; } #PopupWindow h1 { display: block; margin: 0; padding: 3px 5px; background-color: #cccccc; text-align: center; } #PopupWindow p { margin: 0px; padding: 5px; font-size: 90%; } #PopupWindow a { display: block; position: absolute; top: 50%; left: 50%; margin: -70px 0 0 145px; width: 25px; height: 25px; background-color: #ff3333; text-align: center; text-decoration: none; font-size: 120%; } </style> <script type="text/javascript"> function OpenPopup() { document.getElementById('PopupOverlay').style.display = 'block'; document.getElementById('PopupWindow').style.display = 'block'; } function ClosePopup() { document.getElementById('PopupOverlay').style.display = 'none'; document.getElementById('PopupWindow').style.display = 'none'; } </script> </head> <body> <h1>Some thing</h1> <p>This is the main content of the site.<br /> Click <a href="javascript: void(0)" onclick="OpenPopup();">here</a> to show a popup window. </p> <div id="PopupOverlay"></div> <div id="PopupWindow"> <h1>Popup Window!</h1> <p>This is the text inside my popup window!</p> <a href="javascript: void(0)" onclick="ClosePopup();">x</a> </div> </body> </html>
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
And use [code] tags!
![]() |
Similar Threads
- IE will not open new URL from address bar (Viruses, Spyware and other Nasties)
- IE Address Bar hijacked by http://s5.th.msie.cc/ index.php (CWShredder.exe) (Viruses, Spyware and other Nasties)
- Use the Address Bar to Launch Programs or Web Pages (Windows tips 'n' tweaks)
- Outlook address bar (Web Browsers)
- IE 6.0 doesn't show address bar, pull-down menu and shortcut icons when opened (Web Browsers)
- IE 6.0 doesn't show address bar, pull-down menu & short-cut icons when opened (Windows NT / 2000 / XP)
Other Threads in the PHP Forum
- Previous Thread: create playlist for audio player ?
- Next Thread: About uploading file
Views: 421 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class clean cms code countingeverycharactersfromastring cron curl database date directory display download dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail match menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions simple sms soap source space spam speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube





