Jump to content

Webworldx

Members
  • Posts

    347
  • Joined

  • Last visited

Posts posted by Webworldx

  1. Will the file holding the data always have the days in order, or could they appear randomly?If it's in order, then you could always check [x-1] to see if it's the same as the current [x] value (if it is, don't print the date).If not, you could sort the data first then do the above, or you could hold all the dates in a temporary array as you find them, and query that list every time [x] increases?

  2. How would setInterval help out?

    Unless the setTimeout is changing every time, setInterval seems a better option. You can't keep the object local unfortunately either, due to the nature of the function combined with the setInterval/setTimeout (can you imagine the memory leakage?). A global variable/array as adservio suggested would be a good idea, and easy to keep track of :)
  3. It looks like you're writing the table faster than the AJAX can execute. Your code seems to go

    Write first row + cellSend first AJAX requestWrite second row + cellSend second AJAX requestReceived first AJAX requestReceived second AJAX request
    I could be wrong, but an alert() in your stateChanged should tell you when it's being executed, and how much of the table has been created at the time.
  4. It's not the problem, but it's not a good solution to use. Think about it, document.body.innerHTML.replace(/</g,"") destroys the entire DOM tree in an instant, and you'll probably end up with an operation aborted or similar. Also, the script you use will probably end up inside the body of the page 60% of the time, so any innerHTML replace of an exact text in the body also replaces it in the script. You can see where the errors come in...

  5. I looked around and apparently IPB has a change display name feature under My Controls but it appears to be turned off here. Perhaps there was a cliche that allowed blue ot change his name or something.

    Nope, just PMed an admin and asked him to do it :)
  6. You can't use XMLHttpRequest cross site, so that's not an option.How about something like:

    <script type='text/javascript'>function site_noexist(){	alert('there was an error loading the image from the site');}//This will work, as the image exists on the site, and can be reached.var testSite = new Image();testSite.onerror = site_noexist;testSite.src = 'http://www.google.co.uk/intl/en_uk/images/logo.gif';//This will fail, as the site gogle does not hold the image.var testSite = new Image();testSite.onerror = site_noexist;testSite.src = 'http://www.gogle.co.uk/intl/en_uk/images/logo.gif';</script>

×
×
  • Create New...