0
$this->alchemyapi = new AlchemyAPI();
$response = $this->alchemyapi->sentiment("text", "Text to anaylse", null);  

I have the above code which made a request to AlchemyAPI and wait for the response ,in the action of my controller.My question is that what should I be using to create the progress box that showing spinning icon while the request is being processed.And the dialogbox disappear when the request is finished?.I am also wondering if that would be possible to do it on the server side(on the controller/action) instead of using Javascript/Jquery on the view.

Since how I design my code is I am passing $response variable to the view.

 $this->set($response);

I am new to CakePHP and I have no idea where to start with that.Any help would be much appreciated.

Zaw Htut
  • 1
  • 1
  • 4
  • 1
    `what should I be using to create the progress box that showing spinning icon while the request is being processed` javascript – AD7six Jul 02 '15 at 06:13
  • Interesting!. But the thing is that code is my controller and not the view. So I am not quite how I should use javascript when the request is shoot? – Zaw Htut Jul 02 '15 at 06:20
  • It's irrelevant where the code is (it's also irrelevant to your question what backend framework/language/etc. you are using and even _what_ you want to do server side) - you are describing client-side behavior. Things to google: javascript, xhr, ajax. [Here's a relevant jQuery method](http://api.jquery.com/jquery.post/) too. – AD7six Jul 02 '15 at 06:26

0 Answers0