Search Unity

OpenURL in an other window

Discussion in 'Scripting' started by gul, Feb 26, 2008.

  1. gul

    gul

    Joined:
    Jan 28, 2008
    Posts:
    25
    Hi everybody !
    I would like to know how can I open an URL in an other window (like html "target='blank'")

    Thanks for your attention

    Gul
     
  2. podperson

    podperson

    Joined:
    Jun 6, 2006
    Posts:
    1,371
    JavaScript:

    winRef = window.open( URL, name [ , features [, replace ] ] )

    It's target="_blank" just FYI. target="blank" will work once, and the second time will open the second URL in the first window. target specifies the frame in which to open the url, blank just becomes a frame named "blank".
     
  3. gul

    gul

    Joined:
    Jan 28, 2008
    Posts:
    25
    hi !
    Thanks for the reply !

    I try your script,but,it's the same...

    my project is a "web project" and when I click on a link (with : Application.OpenURL) the page replace my "web project"'s page...

    How can I do for adding a new window ?

    Gul
     
  4. SWGraham

    SWGraham

    Joined:
    Mar 10, 2008
    Posts:
    49
  5. SWGraham

    SWGraham

    Joined:
    Mar 10, 2008
    Posts:
    49
  6. gul

    gul

    Joined:
    Jan 28, 2008
    Posts:
    25
    Yeah !!!
    I'm gonna try it now !
    I did a little "parallel way" to make this,it was not the great solution, I simply open the "unity wev project" in an other window of my site...
    Like a loop:
    Code (csharp):
    1.  
    2. do(window.refresh, unityWebProject)
    3. while
    4.  clicking.inALink
    5.  
    Thanks for the reply

    Gul
     
  7. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183