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 5 of 5
  1. #1
    Regular Coder
    Join Date
    Dec 2007
    Posts
    269
    Thanks
    28
    Thanked 0 Times in 0 Posts

    js link quota problem in php

    PHP Code:
    echo '<a href="JavaScript:window.open('index.php?do=logout', 'newWindow')">click here</a>'
    when i use single quota it gives error . how can i do it ?

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,642
    Thanks
    2
    Thanked 405 Times in 397 Posts
    PHP Code:
    <?php
    // php code
    ?>
    <a href="javascript:window.open('index.php?do=logout', 'newWindow')">click here</a>
    Or escape the quotes with a backslash.

  • #3
    Regular Coder
    Join Date
    Dec 2007
    Posts
    269
    Thanks
    28
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Inigoesdr View Post
    PHP Code:
    <?php
    // php code
    ?>
    <a href="javascript:window.open('index.php?do=logout', 'newWindow')">click here</a>
    Or escape the quotes with a backslash.
    i did it like

    Code:
    echo '<a href="JavaScript:window.open(\'index.php?do=logout\' ,\'newWindow\')">click here</a>';
    but a windows is up agian (its content is [object Window])

    i want only it goes link i gave and no any window. ?

  • #4
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,642
    Thanks
    2
    Thanked 405 Times in 397 Posts
    Try:
    Code:
    <a href="javascript:window.location('index.php?do=logout')">click here</a>
    If that doesn't work make a post in the Javascript forum.

  • #5
    Regular Coder
    Join Date
    Dec 2007
    Posts
    269
    Thanks
    28
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Inigoesdr View Post
    Try:
    Code:
    <a href="javascript:window.location('index.php?do=logout')">click here</a>
    If that doesn't work make a post in the Javascript forum.
    it does not run


  •  

    Posting Permissions

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