hi i have call ajax in other page like this

<script type="text/javascript">

    ////////////////////////////////
    //
    // Refreshing the DIV FANBOO2
    //
    ////////////////////////////////

    function refreshdiv_fanboo2(){

    // Customise those settings

    var seconds = 1;
    var divid = "fanboo2";
    var url = "http://pickthefights.com/fanboo2/?id=<?php echo $idvar ?>";

    // Create xmlHttp

    var xmlHttp_two = AJAX();

    // No cache

    var timestamp = fetch_unix_timestamp();
    var nocacheurl = url+"?t="+timestamp;

    // The code...

    xmlHttp_two.onreadystatechange=function(){
    if(xmlHttp_two.readyState==4){
    document.getElementById(divid).innerHTML=xmlHttp_two.responseText;
    setTimeout('refreshdiv_fanboo2()',seconds*1000);
    }
    }
    xmlHttp_two.open("GET",nocacheurl,true);
    xmlHttp_two.send(null);
    }

    // Start the refreshing process

    window.onload = function startrefresh(){
    setTimeout('refreshdiv_fanboo2()',seconds*1000);
    }

</script>

here is code from which i call

<script type="text/javascript">
refreshdiv_fanboo2();
</script>
<div name="fanboo2" id="fanboo2"></div>

now i want to run this javascript in this page

<SCRIPT language="JavaScript" SRC="<?php bloginfo('template_directory'); ?>/countdown.php?timezone=Asia/Kuala_Lumpur&countto=2020-01-01 00:00:00&do=t&data=WAWASAN 2020"></SCRIPT>

but this script is not working in ajax page this script is working in others please help me as soon as possible

Recommended Answers

All 10 Replies

Are you sure that var url is correct?

yes it is correct, it is not working can u tell me why, and other html and php code is working.

The URL you are getting from nocacheurl will look like below:

http://pickthefights.com/fanboo2/?id=10?t=1185158783

I assumed your implementation of fetch_unix_timestamp() returns unix timestamp as in mysql

Do you still think your URL is correct?

can u tell me where i can edit link. and i want to make count down from unix timestamp and want to use php, mysql and js can u tell me what is best way to do.

count down is not working in first link

Count downs are working in both pages for me

i have 2 count down one, wait check now i remove one count down

Still each link has a count down.. What is the issue you are having?

you are not login i think, i have remove login function check, now i think it will work there, countdown is working in one page not in other page

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.