Results 1 to 20 of 20

Thread: Hi

  1. #1
    Zeus is offline Member
    Join Date
    Jun 2010
    Posts
    18
    Rep Power
    0

    Default Hi

    can we restrict the option to open a page(link) in 'new tab' or 'new window' from all browsers using code.

  2. #2
    gcalvin is offline Senior Member
    Join Date
    Mar 2010
    Posts
    953
    Rep Power
    5

    Default

    Quote Originally Posted by Zeus View Post
    can we restrict the option to open a page(link) in 'new tab' or 'new window' from all browsers using code.
    Why do you hate your users so much you want to take that control away from them?

    -Gary-

  3. #3
    Zeus is offline Member
    Join Date
    Jun 2010
    Posts
    18
    Rep Power
    0

    Default

    I am trying to find a way for that. Is there a way?

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,097
    Rep Power
    20

    Default

    Unless you've written the browser yourself then you won't be able to do this in Java.

  5. #5
    Zeus is offline Member
    Join Date
    Jun 2010
    Posts
    18
    Rep Power
    0

    Default

    Thanks.... Is there any alternative way.

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,097
    Rep Power
    20

    Default

    No idea, this is a Java forum.
    Possibly something in Javascript?

  7. #7
    Zeus is offline Member
    Join Date
    Jun 2010
    Posts
    18
    Rep Power
    0

    Default

    if we click 'new tab', we should b alert with a message .can v develop this using java.

  8. #8
    Zeus is offline Member
    Join Date
    Jun 2010
    Posts
    18
    Rep Power
    0

    Default

    ok thanks.

  9. #9
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,097
    Rep Power
    20

    Default

    You're not confusing Java with Javascript are you?

  10. #10
    Zeus is offline Member
    Join Date
    Jun 2010
    Posts
    18
    Rep Power
    0

    Default

    no, not confusing. i am trying to do that n java by any means.

  11. #11
    gafa's Avatar
    gafa is offline Senior Member
    Join Date
    Jun 2010
    Posts
    107
    Rep Power
    0

    Lightbulb

    Quote Originally Posted by Zeus View Post
    can we restrict the option to open a page(link) in 'new tab' or 'new window' from all browsers using code.
    Maybe you can use

    Java Code:
    function fofo()
    {
    
    }
    <a onClick=(fofo())>hello</a>
    But it is not Java API anyway :P
    + 1 my REP
    Good Luck :)

  12. #12
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by Tolls View Post
    Unless you've written the browser yourself then you won't be able to do this in Java.
    And I don't see a point of need to control browsers features.

  13. #13
    Zeus is offline Member
    Join Date
    Jun 2010
    Posts
    18
    Rep Power
    0

    Default

    ya ... i got a way but not in JAVA. Thank u all....

  14. #14
    gcalvin is offline Senior Member
    Join Date
    Mar 2010
    Posts
    953
    Rep Power
    5

    Default

    Quote Originally Posted by Eranga View Post
    And I don't see a point of need to control browsers features.
    Exactly, at least as a software developer. I can imagine situations where a sysadmin would want to lock down a machine (a kiosk situation, for instance) but I don't want to encourage developers to write user-hostile software. I'd sure be annoyed if, for instance, I went to a web site that insisted on opening pages in new windows instead of tabs.

    -Gary-

  15. #15
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by Zeus View Post
    ya ... i got a way but not in JAVA. Thank u all....
    Then using what/ If you don't mind you can share it here with us. But not in much details, because this forums related with Java technologies. :)

  16. #16
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by gcalvin View Post
    Exactly, at least as a software developer. I can imagine situations where a sysadmin would want to lock down a machine (a kiosk situation, for instance) but I don't want to encourage developers to write user-hostile software. I'd sure be annoyed if, for instance, I went to a web site that insisted on opening pages in new windows instead of tabs.
    Mainly what I've believe is that your software should be more independent from the system, I mean the PC. If your software going to be more system dependent, then the value you can build on the product is very less amount.

  17. #17
    Zeus is offline Member
    Join Date
    Jun 2010
    Posts
    18
    Rep Power
    0

    Smile

    It was in Java Script.

  18. #18
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  19. #19
    Zeus is offline Member
    Join Date
    Jun 2010
    Posts
    18
    Rep Power
    0

    Default

    ---------ok----------

  20. #20
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •