Display large text files via Ajax / dojo

I want to show the user a large text file (in particular, 100 MB log files) through the web interface, without requiring the user to download the entire file. Obviously, returning the entire file to a web browser would not be reasonable, so my theory was to use Ajax to extract parts of the file depending on the user scrolling the file, similar to how Google Maps provides a “window” cards.

My application server is PHP, and I’m sure I can fulfill the relevant requests and read the file and return the results via XHR to the application, but my structure is Ajax dojo, and I can’t come up with any dijit standard that would work, and I trying to figure out how best to implement something.

Should I get my own widget? Is there something out there that I don't know about? If I create my own widget, what structure should it use and are there any good resources for developing custom widgets for dojo / dijit? Any other thoughts?

+5
source share
4 answers

This is similar to what you might need . I would suggest that you use it, because in the end you will want to perform some actions on each line, most likely each line will be relevant.

, , , , , . . .

, 25 , 25 + , , 25 + .

100- , , , . , 1- : 25 + , 2- 25 + prev 25 - .

, , , , firefox, , , , / . , , - , , .

, / , , , .

: Ajax - Twitter, tut - , - googlecode

+1

.

, , (100 +) , , -, - script . , , - , , - .

, : 1) , . cron . readfile_chunked (http://cn2.php.net/manual/en/function.readfile.php#48683) .

2) script, (, "./readfile?chunk=##" ) .

3) , , AJAX.

: . : , script . , . ( O (n)).

+1

Dojo Grid ? "", .

+1

, , .

:

  • . , , div, textarea <ul><li>
  • , , .
  • AJAX, 100 . ( GET URI), PHP script
  • AJAX , AJAX.
  • , . AJAX , 2 .

I don't know much about Dojo. I am using jquery scrollable tools in my application. It is easy to place an event handler when the scroller reaches the last page, and then selects the next item.

0
source

All Articles