User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 456,561 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,494 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 786 | Replies: 1
Reply
Join Date: Oct 2007
Posts: 1
Reputation: manilodisan is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
manilodisan manilodisan is offline Offline
Newbie Poster

Ajax help

  #1  
Oct 24th, 2007
I have a page that is supposed to create a very long report working with pages downloaded from the internet and lots of regexes. At this moment, I'm running each step by elimination (for every page I check, I update a field and change the status to 1), refresh the page and start over with the next 10 pages...and soon I repeat this procedure until there's no page left with the status to 0.

The problem is that this procedure is very old and ugly with those refreshes. I would be interested in some ajax solution that would perform similar. Any ideas?!

Here's a demo with the actual page (just a demo, not my code):

/*
      $get_10_unfinished_pages = //this pulls out maximum 10 pages that have the status 0
      get_Page () = //the actual url
*/


if ( $get_10_unfinished_pages ) {
      foreach ( $get_10_unfinished_pages as $page ) {
           perform_various_regexes ( $page );
           update_page ( $page );//this changes the status to 1 = checked
           header ( "Location : " . get_Page () );
      }
}
else {
      //do something here as well
}

Basically, I would love to see some ajax script that would do this:

call a page until the response is FALSE and only after that it should move to another task.

Thank you.
Last edited by manilodisan : Oct 24th, 2007 at 1:16 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Posts: 9
Reputation: Xavier2k is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
Xavier2k's Avatar
Xavier2k Xavier2k is offline Offline
Newbie Poster

Re: Ajax help

  #2  
Oct 26th, 2007
Hi manilodisan, AJAX is quite simple once you know how it works. Take a read of this tutorial and after about 5 minutes you should have enough knowledge to impliment ajax code into your script.

AJAX Tutorial
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 5:42 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC