SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Mar 2008
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question New to Javascript and Ajax

    Hi I'm new to this. Anyone that can help with be a life saver. I have the following code that I'm working with:

    Code:
    <script language="javascript" type="text/javascript" src="http://<%= Request.ServerVariables("HTTP_HOST") %>/assets/javascript/mootools-release-1.11.js"></script>
    	<script language="javascript" type="text/javascript">
    	
    		setTimeout('RefreshOracleMonitor', 120000);		
    		
    		function RefreshOracleMonitor() 
    		{
    		var myAJAX = new AJAX("http://<%= Request.ServerVariables("HTTP_HOST") %>/OracleMonitorImage.asp", {method: 'get', update: $(oraclemonitor)});
    		}
    	
    	</script>
    	<div id="oraclemonitor" style="width: 100%; height: 52px; background-color: #FFFFFF; overflow: hidden; border-bottom: 1px solid #FFFFFF; border-bottom: 1px solid #FFFFFF; border-top: 1px solid #FFFFFF; cursor: pointer;">
    		
    </div>
    I'm not getting any errors on it, but it just doesn't work. It should be returning an asp page inside of a div every 2 minutes. Any ideas what I'm doing wrong?

    Thank you!

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Replace
    setTimeout('RefreshOracleMonitor', 120000);

    with
    setInterval(RefreshOracleMonitor, 120000);

    If that doesn't help...
    Using firebug or fiddler you can monitor http requests and see if they are occuring, and what data is being transferred to and from your web page.

  3. #3
    SitePoint Member
    Join Date
    Mar 2008
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Jim, again thank you for your help. I did try setInterval, but it still doesn't work. I did view the page in firebug, and it looks like the page is sending a request, but not receiving a response. I don't think it is finding the asp page that I created. I'm going to guess that I need to correct the locatoin in the javascript. Thanks again for your help.

    Holly


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
  •