Hi Guys I have created this script to read URLs from a TXT file and the pass them to an array .. this part is working good, but when I try to add the second part of the script that will send each array element to a PHP file to handle it and return the proper results, it doesnt work
Before I list the script .. here is the content of Test3.txt http://site.info/ http://site1.info/ http://site.com/ And here is an assumption how the PHP file blogs.php might look: <? $keyword=$_REQUEST['keyword']; echo $keyword; ?> Here is my script below, any help is appreciated guys: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <script src="prototype.js"></script> <title>JS</title> </head> <body> <SCRIPT LANGUAGE = JAVASCRIPT> var request = new ActiveXObject('Msxml2.XMLHTTP'); request.open('get', 'Test3.txt', true); request.onreadystatechange = extractURLs; request.send(); // document.write(responseText); function extractURLs() { // if (request.readyState == 4 && request.status == 200) { urlArray = request.responseText.split("\n") start_your_function(urlArray); // } document.write(urlArray.length); } document.write(urlArray[5] + "<br />"); var i=0 ; var dd= urlArray.length - 1; document.write(dd); document.write(i); for (i=0;i<=dd;i++) { var keyword=urlArray[i]; // When I add this part it is not working any more var request2 = new ActiveXObject('Msxml2.XMLHTTP'); new Ajax.Request('blogs.php?='+keyword, true); Ajax.Responders.register(responder); document.write(i); document.write(keyword + "<br />"); */ } </SCRIPT> </body> </html> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
