admin管理员组文章数量:1435090
I've got a spring mvc framework and I want to disable the url address bar when the page loads! (It's not a public web application) How can I achieve this using javascript or jquery.
Update :
Guys, If I can make the url bar read only that would be okay too!
I've got a spring mvc framework and I want to disable the url address bar when the page loads! (It's not a public web application) How can I achieve this using javascript or jquery.
Update :
Guys, If I can make the url bar read only that would be okay too!
Share Improve this question edited May 3, 2013 at 3:57 Imesh Chandrasiri asked May 3, 2013 at 3:46 Imesh ChandrasiriImesh Chandrasiri 5,69915 gold badges63 silver badges107 bronze badges 8- You can't do this, and for good reason. – Justin Helgerson Commented May 3, 2013 at 3:47
- 2 You could create your own browser that allows this to happen. Otherwise, no. – Ian Commented May 3, 2013 at 3:48
- c'mon guys, we can be creative. You can instruct the user to go full screen? You could write a browser extension? You could contact the IT guys and block all outgoing connections? – Kavi Siegel Commented May 3, 2013 at 3:50
- @KaviSiegel - Since when does jQuery make the IT guys block outgoing connections? – Justin Helgerson Commented May 3, 2013 at 3:51
-
2
opening a new popup window with
window.open
can set location (address bar) to read only...see: stackoverflow./questions/2909645/… – MikeM Commented May 3, 2013 at 3:53
4 Answers
Reset to default 1One potential workaround is to create a simple WPF app that hosts a web browser control that fills up the entire form. The web browser control does not have the url address bar,so you can simulate what you're describing using this approach. Might work since you said it's an internal application.
Note: The browser control will behave like IE
You cannot hide the address bar in your browser programmatically.
You can hide the address bar in browser windows opened by your javascript code, although I think some browsers are even overriding this now too.
I am afraid this is mission Impossible. You can't hide something that is directing you. The link on webpages are all visible. The concept to hide url is to making them non understandable. Encrypt the certain portion of the url like id, slug ...
- You can make location bar readonly only if you are using window.open.
- In case of IE, we can change the setting of browser for this. But this may not be good idea.
so for just disabling location bar by using window.open, the code is as follows:
subwin = window.open(url,"dummyname",'width=635px,resizable=no, height=535px, menubar=no, toolbar=no, location=no, scrollbars=no');
In the example above, location=no disables the location bar. You can change the value of size,scrollbars, menubar etc. as your choice.
Thank you.
本文标签: How to disable the url address bar using javascript or jqueryStack Overflow
版权声明:本文标题:How to disable the url address bar using javascript or jquery - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745649200a2668321.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论