SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Sep 2005
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how can I go back to calling page using location.replace?

    I still haven't solved my last problem, which codes are

    PHP Code:
    if (isExistingShowtime($db)) {

    ?>
        <script language="javascript"> 
        <!-- 
            alert("this showtime has been already in my schedule");
            location.replace=("<?php echo $_SERVER['HTTP_REFERER']; ?>");         

        --> 
        </script> 
    <?php 

    }
    I've found that if I gave definitive url to replace something like
    location.replace=("index.php");

    it goes to the index page after showing alert.
    But I absolutely need $_SERVER['HTTP_REFERER'] as this one is called from various page.
    What's wrong with my replace code?

    Thanks,

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Please keep your discussion to one thread and do not cross-post. Thank you.


Bookmarks

Posting Permissions

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