I am using window.open()
method to open a page as a pop-up window for a link button click event.
But the poup-up window is having minimize,maximize,close(x) button.
I dont want those buttons. How can remove these buttons?
This is the method i am using,
window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,titlebar=no,scrollbars=1,resizable=0,width=450,height=310,left=500,top=350");
Tell me how can do this.
Regards, Chirag Jain.
I am using window.open()
method to open a page as a pop-up window for a link button click event.
But the poup-up window is having minimize,maximize,close(x) button.
I dont want those buttons. How can remove these buttons?
This is the method i am using,
window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,titlebar=no,scrollbars=1,resizable=0,width=450,height=310,left=500,top=350");
Tell me how can do this.
Regards, Chirag Jain.
Share Improve this question edited Jun 11, 2013 at 17:30 Tiago Sippert 1,3307 gold badges24 silver badges33 bronze badges asked Aug 7, 2012 at 11:19 chirag jainchirag jain 111 gold badge1 silver badge1 bronze badge 2- 1 Think about how would you feel if someone pops up a window in your browser and you can't close it. – Vatev Commented Aug 7, 2012 at 11:23
- @Vatev Think about a scenario where the user is paying using credit card and want to prevent accidental closure of the window – Vamshi Commented Nov 21, 2012 at 6:12
2 Answers
Reset to default 2You can't.
If you want a popup style window without full window decorations you'd have to create a new overlay <div>
on top of the existing content and fill that with content, perhaps using an <iframe>
.
You can't do it from javascript alone. Think about it, if you could, then people could put it into code on web-pages and cause other people's puters to open windows they couldn't easily close.
Instead you'll have to look for an answer specific to whichever browser you're using to host this application, and change it on the puters of your users appropriately. Even then though I don't think you'll be in luck (with Firefox for example, I can see how to get rid of them on all browser windows, but not on just one).