Path

ez projects / ezxajax / forum / general / how to modify a session obj...


how to modify a session object

You need to be logged in to post messages in the forums. New users may register here.

florian bellenger

Member since:
16 July 2008

Posts: 3

Wednesday 11 February 2009 12:08:43 pm

Good morning,

Here is a short presentation of the problem I have today :

I tried to change the value within a Session object I created with a “ ezxajax function”. I have the error message “ERROR: No response processor is available to process the response from the server. Content-Type: text/html; charset=utf-8”. The problem is I don’t want to return anything. Is it possible?

More information :

I have an operator to change the value of a Session object which is working. I added the ezxajax configuration files and operators inside its folder.

This extension folder contains the following items :



/autoloads/ eztemplateautoload.php /* declares a set_session_object ($key, $value) function within a toto.php file */


/settings/site.ini.append.php


/settings/xajax.ini.append.php /* declares a set_session_object ($key, $value) function within an xajax_toto.php file*/


/xajax/xajax_toto.php /* defines a  set_session_object ($key, $value) function which creates a new toto object and calls its set_session_object ($key, $value) function.


 

/toto.php /* defines a set_session_object ($key, $value) function




In the template,



{def $hasXajaxAccess=fetch('user','has_access_to',hash('module','xajax','function','all'))}


        


         {if $hasXajaxAccess}


          

                 {run-once}{xajax_javascript()}{/run-once}


{/if}


 



 

<a onclick='xajax_ set_session_object (“the”, 334);'>change value</a>


 



Thank you in advance for yours answers
Florian.

It seems you can use Yahoo.util.connect to process the response; But isn't there something similar inside the ezxajax extension?

My code now looks like this :




<a onclick='var callback ={success: function(o) {alert("sucess");}, failure: function(o) {alert("failure");}};var request = YAHOO.util.Connect.asyncRequest("GET", "<i>url</i>", callback, null); 'xajax_ set_session_object (“the”, 334); return false;'


 

<i>url</i> is the current url.


 

Up

You need to be logged in to post messages in the forums. New users may register here.