Hi Guys, I am writing this code to pull URLs form txt file and pass them to an array .. (this part is working well) but the second part which is sending each array element to external PHP file to get some results is not working for me.
The Text3.txt file is looking like this: http://site.info/ http://site1.info/ http://site.com/ You can assume the blogs.php file will look like this : <? $keyword=$_REQUEST['keyword']; echo $keyword; ?> Anybody can help me in that ? your help will be appreciated guys .. here is my code <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 -~----------~----~----~----~------~----~------~--~---
