Welcome Guest, Not a member yet? Register   Sign In
How to using Ajax -mootools in CI ?
#4

[eluser]xwero[/eluser]
Ajax calls are almost the same in all the javascript library. The unmodified example will produce mootools-record-delete.php?delete=1&ajax=1 to connect to the severside code.

If you want to make it work in CI you have two options.

Only changing the url. This means the uri_protocol setting in the config.php file is best set to path_info/orig_path_info/request_uri which makes CI blind for the query string as a part of the url. Because CI cleans the GET global you can restore it in the method
Code:
parse_str($_SERVER['QUERY_STRING'],$_GET);

The second option is to remove the data part and add the parameters as segments of the url
Code:
url: ‘controller/method/’+ parent.get(‘id’).replace(‘record-’,’‘) + '/1',
This means you don't have to change the settings you already have or restore the GET global.


Messages In This Thread
How to using Ajax -mootools in CI ? - by El Forum - 07-03-2009, 01:36 AM
How to using Ajax -mootools in CI ? - by El Forum - 07-03-2009, 02:28 AM
How to using Ajax -mootools in CI ? - by El Forum - 07-03-2009, 02:51 AM
How to using Ajax -mootools in CI ? - by El Forum - 07-03-2009, 02:57 AM
How to using Ajax -mootools in CI ? - by El Forum - 07-03-2009, 02:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB