This content has been marked as final.
Show 2 replies
-
1. Re: Ajax calls doesn't return to scope of JavaScript module
manakor Sep 5, 2011 5:22 AM (in response to manakor)Maybe, I can use jsf.ajax.request or jsf.ajax.response functions inside my JavaScript modules?
Is it possible to archive someting similar what jQuery do with their AJAX by using JSF?!
// javascript file content
var myVaribale = "spiderman";
ajax({
url: "...",
data: { param1: param1 }, // params sent to Backend via AJAX
success: function(data){
// do something with data
myVaribale = data.hero; // data.hero is batman
console.log(myVaribale); // console will throw 'batman'
}
});
-
2. Re: Ajax calls doesn't return to scope of JavaScript module
manakor Sep 5, 2011 5:38 AM (in response to manakor)I have posted another similar question to StackOverflow:
- http://stackoverflow.com/questions/7306269/using-jsf-ajax-methods-to-keep-javascript-module-scope