I am sorry to sound confusing but I will try to explain in the best way possible.
In the controller I have a function search
public function search(){
/*
I run my logics and get few URL from
where I need to fetch further data
the urls are saved in the URL array
$urls[0] = "http://url1.com/search1";
$urls[1] = "http://url2.com/search2";
I then set this in data variable and send it to view
so that It can be run in AJAX
I tired running get_file_contents but it executes
in series one after the other URL.
If there are 10 URL (5 secs per URL) the over all processing time
increases drastically
*/
$data["urls"] = $urls;
$resp = $this->load->view('ajaxer',$data,TRUE);
/* based on the $resp i need to run further business logic's */
}
Now the $resp is actually giving me only the HTML code. It is not executing the HTML and hence the ajax is not run.
Any thoughts on how to execute this will be really helpful.
Regards, Amit
successitem in the ajax options. The optionsuccessis a function that receives the output of the controller. In that function is where you manipulate the html to use the returned data. Add the javascript code where you make the ajax call and the html of the view to be updated.$respcontains html because that is the intended purpose ofload->view('someview');- to return the contents (typically html) in the file "someview". A clear explanation of what you are trying to achieve would be very helpful. For instance, what do you plan to do with the search URLs?