Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,
When we open the Child window the url request should display.as 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/Mbpresult.jsp?Target=Parent&flag=2¶m=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.



Thanks in advance.
Regards
Sumanta Panda
 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
since you don't want to allow to change the url of the page, remove the parameter (location=yes) if it dosen't work, change its value to no. this will hide the text field where you write the url.
 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 "http://localhost:81/orderbook/Mbpresult.jsp?Target=Parent&flag=2¶m=1".

we cannot go that link and modify it like "http://localhost:81/data/cbpsolutation.jsp?Target=Parent&flag=2¶m=1".

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.

Sir,
Please suggest me for the needful.

Thanks and Regards
Sumanta Panda
 
Omar Al Kababji
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't do that. if you search the internet you may find some stuff that works for IE and not for FF or Safari. however you can't. i think that old browsers allowed you but not new ones. in addition your users may get security warnings. then i don't understand the need to show the address bar if the user isn't allowed to change it, tell your boss to change his mind and ask something reasonable ;)
 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your valuable advise.Atleast now i can explain my Boss about it.

The address bar need to showing for user because user should feel that some action performed.

Thanks a lot sir.

Regards
Sumanta Panda

 
Omar Al Kababji
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sumanta panda wrote:
The address bar need to showing for user because user should feel that some action performed.



it would be enough to show the status bar to let the user know that some action performed, at the end that what its name suggests "status bar" ;)
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"How do I tell my boss" Um, you tell him that the URL can not be restricted?

Browsers like IE8 and Firefox actually show the address on the page and you can not change it, but you can copy it and paste it into a new window.

Eric
 
look! it's a bird! it's a plane! It's .... a teeny tiny ad
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic