Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Vancouver, WA
    Posts
    233
    Thanks
    2
    Thanked 0 Times in 0 Posts

    location.href to a New Window

    I use this code to create a banner that contains text:

    <table onClick='location.href="URL"' onMouseOver='this.style.cursor="pointer"'><tr><td>text of banner...

    because it makes the whole banner a link. If I do it this way:

    <table><tr><td ><a href='http://URL' target='_blank'>text of banner...

    only the text is the link and if someone puts their cursor over a non-text area they might no realize they can click on it.

    In the second example, however, I use target='_blank' to open up a new window.

    My question is, is there a way to use the first method and open a new window.

    Thanks, Peter

  • #2
    New Coder
    Join Date
    Jul 2002
    Location
    UK
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try looking up JavaScript's window.open(); method.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Vancouver, WA
    Posts
    233
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Sorry, I should have mentioned that.

    I can't use the word "open" in my JS pages because Symantec's anti-ad software will insert JS coding into them and break them:

    http://www.codingforums.com/showthre...196#post358196

    Thanks, Peter


  •  

    Posting Permissions

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