0

I really need your help. I am working on a pop up window using JavaScript.

I am using the window.open(URL,name, properties);

I wanted to load a window that does not load the URL window. I tried the location=0 and location=no setting, it seems to work fin on Firefox but alas it is not working on IE!

In Firefox, it is not showing the location bar anymore, but in IE the location bar is still there with the URL!

Please help. :9

tinks~

Alex K.
  • 171,639
  • 30
  • 264
  • 288
tinks
  • 1
  • What version of IE are you using? If I remember correctly, in IE9 the user can choose to allow javascript to hide the the location bar or not. By default, it's not allowed, so there's nothing you can do about it if that's the case. – Aleks G Sep 08 '11 at 09:30
  • Why not use a javascript-based dialog instead of the native `window.open`? – yoda Sep 08 '11 at 09:31
  • Can you show us the properties you are sending? – TJHeuvel Sep 08 '11 at 09:34
  • I am basically sending this: window.open(site,"Data_Options","location=0,menubar=0,scrollbar=0"); and all the other properties.. Because i need to put selects on the window, can i use dialog with that? – tinks Sep 08 '11 at 09:42
  • 1
    You cannot force hidden url bar due to security reasons od IE. Same question [HERE](http://stackoverflow.com/questions/1164899/ie7-popup-hide-the-url-bar) – Gatekeeper Sep 08 '11 at 09:43

2 Answers2

1

You seem to be calling the method correctly, IE most likely doesnt allow you to hide its url bar. Most browsers have user-defined preferences whether they want to allow websites to be able to hide toolbars. Popups are very susceptible to security options.

I'm afraid you'd have to live with it, if the user doesnt want you to hide the url it wont.

TJHeuvel
  • 12,403
  • 4
  • 37
  • 46
  • ouch :( thanks guys for the quick replies. i hope i can use dialog instead, or can i? because i don't want the users to see the url. :( – tinks Sep 08 '11 at 09:46
  • A dialog is possible, for example using jQuery UI. Why is it you want to hide the URL so badly? Perhaps you could make some sneaky proxy page. – TJHeuvel Sep 08 '11 at 09:49
  • Because it actually is like a data lookup window, where selects are provided for the user to chose data from. For security reasons also i guess. I can't seem to think on how i go about on this. :( – tinks Sep 08 '11 at 09:52
0

Not possible anymore as all modern browsers do not allow you to hide the URL in Popups anymore :)

Walialu
  • 4,096
  • 2
  • 27
  • 29