Difference between #2 and #5 of
Elementary introduction to using jQuery ajax and the yii framework

Changes

Title unchanged

Elementary introduction to using jQuery ajax and the yii framework

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

AJAX

Content changed

[...]
~~~
[javascript]
ajaxCall = function(a){
jQuery.ajax({
                // The url must be appropriate for your configuration;
 
                // this works with the default config of 1.1.11
 
url: 'index.php?r=app/ajaxProcessor',
type: "POST",
data: {ajaxData: a},
[...]
* Yii reads the route (controller and action) through the GET parameter "r".

With a recent version of Yii, both assumptions
arcan be wrong with the default configurdepending on the configuration of the application.

### The solutions

**You can't guess the webservice URL in pure Javascript!** This URL will depend on the configuration of the application. So there are at least 2 solutions that mix in PHP and JS:
[...]
2 0
15 followers
Viewed: 54 247 times
Version: 1.1
Category: How-tos
Tags: AJAX
Written by: dhimes
Last updated by: François Gannaz
Created on: Sep 12, 2012
Last updated: 12 years ago
Update Article

Revisions

View all history