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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Vancouver, WA
    Posts
    233
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Change onClick='top.location.href="URL"' to Open New Window

    How can I change:

    onClick='top.location.href="URL"'

    to have it open the URL in a new window?

    I tried target="_blank" and got an error message:

    <table width=500 bgcolor='#000000' cellpadding=2 cellspacing=0 align=center onClick='top.location.href="URL" target="_blank"' onMouseOver='this.style.cursor="pointer"'><tr><td>...

    Thanks, Peter

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Code:
    <table width=500 bgcolor="#000000" cellpadding=2 cellspacing=0 align=center onClick="window.open('blah.com')"
    onMouseOver='this.style.cursor="pointer"'><tr><td>

  • #3
    New to the CF scene
    Join Date
    Sep 2003
    Location
    ca
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    PHP Code:
    <table width=500 bgcolor='#000000' cellpadding=2 cellspacing=0 align=center onClick="window.open('http://url.com','target-name')" onMouseOver='this.style.cursor="pointer"' onMouseOver='this.style.cursor="default"'><tr><td>... 
    Last edited by crocodile; 03-09-2005 at 03:06 AM.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Vancouver, WA
    Posts
    233
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks, worked great.

    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
    •