tags:

views:

45

answers:

2

i have tried this code to redirect a php page.but it s not working .can any body please tell me the solution(is there any changes needed in the body part of parent page?).... / / here am pasting the code(header part) /

<script type="text/javascript" src="jquery/jquery-latest.pack.js"></script>
<script type="text/javascript" src="jquery/jquery.timer.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        // This will hold our timer
        var myTimer = {};
            // delay 3 seconds
            myTimer = $.timer(3000, function() {
                //redirect to home page
            window.location = "http://sys3/shinshiva9/shin_shiva/booking_table.php";
            });
    });

</script>
+2  A: 

Loading jQuery libraries is overkill for this when the built-in JS setTimeout method can do the trick.

setTimeout(function() {
    window.location.href = 'http://sys3/shinshiva9/shin_shiva/booking_table.php';
}, 3000);
Matt Huggins
A: 

If you insist on using jquery, this can be done like this.

Javascript portion:

$('.timer').oneTime(3000, function() {
//redirect to home page
window.location = "http://sys3/shinshiva9/shin_shiva/booking_table.php";
});

HTML:

  <div class="timer"></div>
SteD
this is not working Sted...is there any additional includes necessary?
rag
I downloaded jquery timer from http://plugins.jquery.com/project/timers, you need to include that after the standard jquery.js
SteD