Exeoutput.SetGlobalVariable problem

It looks like all the old forum posts are gone.

I have big trouble using “exeoutput.SetGlobalVariable” in Chromium (originally I wanted to used ajax and POST to post a variable to a PHP-script, but I finally found out that that was broken and then tried to use global variables, but it seems like that is also broken). I can not set a variable/get it back again. I try using e.g.

exeoutput.SetGlobalVariable(‘myvar’, ‘abc123’, true );

But I get only “undefined”. I’ve tried in many different ways - now used 3 hours for this and getting increasingly frustrated. Is there maybe a new version of exeoutput coming soon?

AJAX will be definitively fixed in next version. We are switching to a new implementation of Chromium engine.

It’s strange that SetGlobalVariable doesn’t work for you. Please try the AJAX demo of the Global Demonstration to see it if works for you.
The associated code is:

function testAJAX()
                     exeoutput.SetGlobalVariable('postdata', 'name=John&location=Boston', false);
                               $.ajax({ type: "POST", url: "Request.php", data: "name=John&location=Boston", success: function(msg){ alert( "Data returned by Script: " + msg ); } });   


And it worked fine in our last tests.

Thanks a lot for your help. I finally got it to work! Conclusions:

  • post via AJAX does not work
  • exeoutput.SetGlobalVariable works in Javascript, but exeoutput.GetGlobalVariable does not work in Javascript - this of course confused me
  • In PHP, if you write exo_getglobalvariable(‘data’) you get nothing out - you need to write exo_getglobalvariable(‘data’,’’)

At least I got it to work, so I am happy!

This topic was automatically closed after 3 days. New replies are no longer allowed.