David,
thanks for the reply.
Basically, it loops over the call to:
http://websvr:8080/timeline/WriteBadFeedToFileServlet
This servlet writes the url(of the bad feed) and a timestamp.
Needless to say, the servlet is called continuously and thus writing to a
log file each time.
Also, I never see the next line of code execute.

Thanks, Graham
I

On 6/25/07, David Huynh <[EMAIL PROTECTED]> wrote:

Graham, when you say that line of code loops forever, you mean that you
keep seeing more and more HTTP POSTs either in FireBug or in your
server's logs? Or do you simply not see the next line of code executed?

David

Graham Forte wrote:
> I am still running into one issue.
>
> I changed the below function to capture the url and use an xmlhttp
> post to write the bad feed to a file with a servlet.
> See comments at very end of this function.
>
> Timeline.XmlHttp._onReadyStateChange = function(xmlhttp, fError,
> fDone, Url) {
>     switch (xmlhttp.readyState) {
>     // 1: Request not yet made
>     // 2: Contact established with server but nothing downloaded yet
>     // 3: Called multiple while downloading in progress
>
>     // Download complete
>     case 4:
>         try {
>             if (xmlhttp.status == 0     // file:// urls, works on
Firefox
>              || xmlhttp.status == 200   // http:// urls
>             ) {
>                 if (fDone) {
>                     fDone(xmlhttp);
>                 }
>             } else {
>                 if (fError) {
>                     fError(
>                         xmlhttp.statusText ,
>                         xmlhttp.status,
>                         xmlhttp
>                     );
>                 }
>             }
>         } catch (e) {
>             var _url = Url.substring(Url.indexOf("url=") + 4);
>             alert(url);//THIS WORKS FINE
>            //CODE BELOW LOOPS FOREVER(WRITES TO A FILE, BUT LOOPS
> INFINITELY)
>             Timeline.XmlHttp.post("
> http://websvr:8080/timeline/WriteBadFeedToFileServlet";, _url, fError,
> fDone);
>            //OBVIOUSLY NEVER REACHES THE CODE BELOW.
>             Timeline.Debug.exception(_url);
>         }
>         break;
>     }
> };
>
>
> Perhaps I am calling this in the wrong function?
>
> Thanks.
>
>
>
>
>
> On 6/25/07, *Graham Forte* < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Nevermind,
>     I figured it out.
>     I overrode the callback and just added an extra variable called Url.
>     Thanks.
>
>
>     On 6/25/07, *Graham Forte* < [EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>> wrote:
>
>         Alan,
>         yes I have firebug, thanks!
>
>         David,
>         it looks like the error is thrown in the catch block of the
>         Timeline.XmlHttp._onreadyStateChange function.
>         Not sure if I can expose the filename of the xml/json from
>         this function.
>         Any ideas?
>
>         On 6/25/07, *Alan McMorran* < [EMAIL PROTECTED]
>         <mailto:[EMAIL PROTECTED]>> wrote:
>
>             Graham,
>
>             Have you tried using Firebug (http://www.getfirebug.com/)
>             on Firefox to debug Javascript? I've found it invaluable
>             for locating bugs in my code.
>
>             HTH
>
>             Alan
>
>             On 25 Jun 2007, at 14:57, Graham Forte wrote:
>
>>             Thanks David,
>>             one more question, The error message I get is "syntax
>>             error" ... I was trying to determine where that
>>             originated from, it didnt seem like it came from the
>>             Timeline._Impl.prototype
>>             .loadJSON function, as that ferror function is: "Failed
>>             to load json data from".
>>             As I said, I get this error when a malformed xml or json
>>             file is presented to timeline.
>>
>>             Thanks.
>>
>>
>>             On 6/24/07, *David Huynh* < [EMAIL PROTECTED]
>>             <mailto:[EMAIL PROTECTED]>> wrote:
>>
>>                 Graham Forte wrote:
>>                 > Hello,
>>                 > I am using timeline to allow user to dynamically
>>                 display rss feeds. On
>>                 > occasion, a user "feeds" timeline a non well-formed
>>                 xml doc and I
>>                 > wanted to capture the statistics of feeds that fail,
>>                 basically I need
>>                 > to capture the url of the feed that the user tried
>>                 to load into timeline.
>>                 > The Timeline.debug js file seems rather generic and
>>                 so I was wondering
>>                 > if there was a way to capture the filename that
>>                 caused the error.
>>                 > Perhaps using debug or loadXML or loadJSON functions?
>>                 You can override those functions yourself by just
>>                 writing some
>>                 Javascript code after you include timeline-api.js.
>>
>>                 In
>>                 http://simile.mit.edu/timeline/api/scripts/timeline.js
>>                 <http://simile.mit.edu/timeline/api/scripts/timeline.js
>,
>>                 find
>>                 Timeline._Impl.prototype.loadXML. Then make a copy of
>>                 that code and
>>                 change the fError inner function.
>>
>>                 Cheers,
>>
>>                 David
>>                 _______________________________________________
>>                 General mailing list
>>                 [email protected] <mailto:[email protected]>
>>                 http://simile.mit.edu/mailman/listinfo/general
>>
>>
>>             _______________________________________________
>>             General mailing list
>>             [email protected] <mailto:[email protected]>
>>             http://simile.mit.edu/mailman/listinfo/general
>
>
>             _______________________________________________
>             General mailing list
>             [email protected] <mailto:[email protected]>
>             http://simile.mit.edu/mailman/listinfo/general
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
>

_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to