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

Revision #5 has been created by François Gannaz on Sep 13, 2012, 3:05:16 PM with the memo:

Fixed my mistake about the default config Yii generates
« previous (#4)

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

[...]
The URL of the AJAX request is relative: "index.php?r=app/ajaxProcessor". It makes 2 assumptions:

* The page that initiates the call has an URL ending with "index.php" or its directory.
* 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: 53 149 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: 11 years ago
Update Article

Revisions

View all history