Hiding Address Bar on Page Load Using JavaScript

Today , I was playing around on how you can Hide an Address/Tool Bar on a Page Reload. I looked at couple of solutions on the net but nothing seems to be available which would work for both IE and Firefox.  I had to figure out a way to do this and I was successful at the end. This is the code I used, to solve my problem.

< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">



If the window does not open, please turn off the pop-up blocker for this site and click here


Edit : A lot of people are having problem implementing this code, may be because of the quote not displaying correctly. To make the life little easier, I have zipped up the code and can be dowloaded from HERE

You can Also Demo it at  http://rahmansaher.com/poper.html

Published by


Dynamic technology strategist and thought leader with 18 years’ achievement rolling-out business solutions and overseeing program/project management and product development in progressively responsible operational leadership roles. Experienced cross-functional and collaborative leader with a demonstrated track record of success at the helm of large (40+) multinational teams. Skilled in diverse software development methodologies, adept at driving seamless integration across technology platforms, effectively managing and coordinating large-scale projects across all phases. Creative thinker who intelligently manages resources, identifies potential partners, and fosters communication to improve the bottom-line.

20 thoughts on “Hiding Address Bar on Page Load Using JavaScript”

  1. Can you please tell me of what its not working and how are you placing you code. Make sure you replace the filename.htm to the filename of your pop up page…

  2. Dude. This is awesome! I think the problem other people were having is that the quote marks in your code need to be replaced with ‘ and “. For some reason, they are italicized in your code and will not work.

  3. hide address bar, standard buttons bar and other bars at the browser when the opening of the page useing java script.

  4. try this, its working on my IE


  5. Hi this we can write simply as

    window.open(‘some.html?’,null,’toolbar=no,scrollbars=no,location=no,resizable =no,width=625,height=550,left=225,top=120′);


  6. I am sorry, I copied the script and changed the filename before I pasted it on my web page which needs to be popped up. But it won’t work. Anyway when I browse the demon, still I see the filename and URL displayed on top of my firefox browser. Also at the bottom, whenever I roll over buttons, I can see the real time filenames display there. Please help. How can we totally make the URL disappear or at least just to show http://www.domainname.com Nothing should appear after dot com. Thanks.

  7. function openwindow()
    var vhotelname = document.getElementById(‘hotelname’).value
    var vdestinationame = document.getElementById(‘destinationname’).value
    popupWin = window.open(‘popupbooking.aspx?hname=’ + vhotelname + ‘&dname=’ + vdestinationame, ‘popupWin’, ‘width=220,height=315,left=860,top=315,toolbar=1,status=1’);

    Its working in IE fine but address baar is not hiding in chrome

Leave a Reply

Your email address will not be published. Required fields are marked *