I need help with a simple code modification :)

Discussion in 'JavaScript' started by googleminigames.com, Nov 24, 2007.

  1. #1
    ("<SCRIPT language=javascript>");
        print("window.open('connect.php?user=$user&tempstore=$today','','width=635,height=635,resizeable=no,status=no')");
        print("</SCRIPT>");
    Code (markup):
    How can i modify that so it can open in the same window

    i have to modify window.open to what?

    Thank you for helping :D
     
    googleminigames.com, Nov 24, 2007 IP
  2. hogan_h

    hogan_h Peon

    Messages:
    199
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try:
    
    print("window.location.href='connect.php?user=$user&tempstore=$today'");
    
    Code (markup):
    It's possible you need full URL there, like http://www.website.com/connect.php....
     
    hogan_h, Nov 24, 2007 IP
    googleminigames.com likes this.
  3. googleminigames.com

    googleminigames.com Banned

    Messages:
    1,335
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i cant believe i forgot about window.location

    :p

    :D
     
    googleminigames.com, Nov 24, 2007 IP
  4. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Just use PHP redirect method:

    header("Location: path/to/file.php?foo=bar");
     
    MMJ, Nov 27, 2007 IP
    selling vcc likes this.
  5. selling vcc

    selling vcc Peon

    Messages:
    361
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #5
    lol... funny... and where do we click?... + rep for this... lol
     
    selling vcc, Nov 27, 2007 IP
  6. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Whatcha mean?
     
    MMJ, Nov 28, 2007 IP
  7. selling vcc

    selling vcc Peon

    Messages:
    361
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #7
    He's asking about client side scripting not server side scripting!
     
    selling vcc, Nov 28, 2007 IP
  8. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #8
    So why is he using print()?
     
    MMJ, Nov 29, 2007 IP