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 3 of 3

Thread: alert()

  1. #1
    Regular Coder
    Join Date
    Oct 2009
    Posts
    438
    Thanks
    9
    Thanked 7 Times in 7 Posts

    alert()

    All,
    I have the following code:
    Code:
    <script type="text/javascript">
    alert("This picture has received more then 10 down votes so it is now being deleted. You will be redirected back to the pictures page!");
    </script>
    <?
    echo "<meta http-equiv=\"refresh\" content=\"2;url=http://website.com/pictures.php\">";
    ?>
    This is just in the code. I thought it would just execute this but it doesn't. I can't have it appear on a button event or an onload since this snipped gets executed with AJAX. How can I make it appear?

    Thanks in advance!

  • #2
    Regular Coder
    Join Date
    Oct 2009
    Posts
    438
    Thanks
    9
    Thanked 7 Times in 7 Posts
    The weird thing is if I just put it in a HTML page, the alert works fine. Not sure why it won't work how I have it set up now.

  • #3
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,472
    Thanks
    13
    Thanked 361 Times in 357 Posts
    sorry, but I don’t understand the problem, can you elaborate?
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer


  •  

    Posting Permissions

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