By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,317 Members | 1,312 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,317 IT Pros & Developers. It's quick & easy.

How to write in java script for the child window url becomes readonly mode

P: 34
Dear All,
When we open the Child window the url request should per my requirement no one cannt change the url of the child window.
for example:
When login the parent window (login.jsp) under this several child window are displaying.
let say when when we open the child window Mbpresult.jsp its url is displaying http://localhost:81/orderbook/Mbpres...flag=2&param=1".
Could you please suggest me how i write in my below code to show the child window url...No body cannt change the child url value..It should be only change when action performed.
Please suggest me how will we do the readonly mode of the child url.

Expand|Select|Wrap|Line Numbers
  1. function showQuoteWindow()
  2. {
  3. var strUrl="<%=response.encodeURL("/orderbook/Mbpresult.jsp?Target=Parent&flag=2&param=1")%>";
  5. }
Thanks in advance.
Sumanta Panda
Jan 20 '09 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 5K+
P: 5,390
i guess the only possible solution when using is to use


browsers (and even versions) handle the location-bar in different ways.

kind regards
Jan 20 '09 #2

P: 34
Thanks for your response.According to my requirement i will show the child window url to the user.i neednot hide it.
But user cannot change the url.
For example the child window url is "[COLOR=#105cb6]http://localhost:81/orderbook/Mbpres...flag=2&param=1[/COLOR]".
we cannot go that link and modify it like "[COLOR=#105cb6]http://localhost:81/data/Resultpres...flag=2&param=1[/COLOR]".
Accoding to your valuable solution it is only hide the url.But i have to do like it should display url link to user and user also not modify it.
Please suggest me for the needful.
Thanks and Regards
Sumanta Panda
Jan 20 '09 #3

Expert Mod 5K+
P: 5,390
as i said ... this cannot be done with since this is handled by the browsers itself and even worse ... in different ways that you cannot (and should not) control to avoid url-spoofing etc. ... you may hide the url and display it inside the page itself ... or use a custom DHTML popup-div or something like that.
Jan 20 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.