Disable address bar in mozilla, chrome???

Reply

Join Date: Feb 2009
Posts: 83
Reputation: ahmksssv is an unknown quantity at this point 
Solved Threads: 7
ahmksssv ahmksssv is offline Offline
Junior Poster in Training

Disable address bar in mozilla, chrome???

 
0
  #1
Nov 7th, 2009
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.....

  1. window.open(url ,'title',
  2. '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...
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 455
Reputation: Atli is on a distinguished road 
Solved Threads: 56
Atli's Avatar
Atli Atli is offline Offline
Posting Pro in Training
 
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:
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Test</title>
  5. <style type="text/css">
  6. #PopupOverlay {
  7. display: none;
  8. position: fixed;
  9. left: 0px; right: 0px;
  10. top: 0px; bottom: 0px;
  11. background-color: #000000;
  12. opacity:.75;
  13. }
  14. #PopupWindow {
  15. display: none;
  16. position: absolute;
  17. width: 350px; height: 150px;
  18. left: 50%; top: 50%;
  19. margin: -75px 0 0 -175px;
  20. border: solid 2px #cccccc;
  21. background-color: #ffffff;
  22. }
  23. #PopupWindow h1 {
  24. display: block;
  25. margin: 0;
  26. padding: 3px 5px;
  27. background-color: #cccccc;
  28. text-align: center;
  29. }
  30. #PopupWindow p {
  31. margin: 0px;
  32. padding: 5px;
  33. font-size: 90%;
  34. }
  35. #PopupWindow a {
  36. display: block;
  37. position: absolute;
  38. top: 50%; left: 50%;
  39. margin: -70px 0 0 145px;
  40. width: 25px; height: 25px;
  41. background-color: #ff3333;
  42. text-align: center;
  43. text-decoration: none;
  44. font-size: 120%;
  45. }
  46. </style>
  47. <script type="text/javascript">
  48. function OpenPopup() {
  49. document.getElementById('PopupOverlay').style.display = 'block';
  50. document.getElementById('PopupWindow').style.display = 'block';
  51. }
  52. function ClosePopup() {
  53. document.getElementById('PopupOverlay').style.display = 'none';
  54. document.getElementById('PopupWindow').style.display = 'none';
  55. }
  56. </script>
  57. </head>
  58. <body>
  59. <h1>Some thing</h1>
  60. <p>This is the main content of the site.<br />
  61. Click <a href="javascript: void(0)" onclick="OpenPopup();">here</a> to show a popup window.
  62. </p>
  63.  
  64. <div id="PopupOverlay"></div>
  65. <div id="PopupWindow">
  66. <h1>Popup Window!</h1>
  67. <p>This is the text inside my popup window!</p>
  68. <a href="javascript: void(0)" onclick="ClosePopup();">x</a>
  69. </div>
  70. </body>
  71. </html>
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
Reply With Quote Quick reply to this message  
Reply

Message:




Views: 421 | Replies: 1
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC