-
19 Nov 2012 6:07 AM #1
Unanswered: document.location Ext.Ajax.request
Unanswered: document.location Ext.Ajax.request
Hi,
I try to change one function for addind Ext.Ajax.Request but I hava a promblem with my url ..
In my function I use document.location = '' and when i take the 'url' and add it in the Ext.Ajx.Request ,
My function :
PS : I take just a part in my function , the part where I do it
And this code with AjaxCode:if(btn=='yes'){ var box = Ext.MessageBox.wait('Traitement en cours ...'); var arrayIds = []; Ext.each(grilleResultat.selModel.getSelection(), function(e){ arrayIds.push(e.data.Id_Amn); }); var jsonLstIds = Ext.JSON.encode(arrayIds); document.location = '/gedeo/amenagement/genererpdf/array/'+jsonLstIds; box.hide(); } },
If someone can help me Pliz.;Code:if(btn=='yes'){ var box = Ext.MessageBox.wait('Traitement en cours ...'); Ext.Ajax.request({ url : '/gedeo/amenagement/genererpdf/array/'+jsonLstIds, params : { jsonLstIds : jsonLstIds }, success : function(response, opts){ box.hide(); }, failure : function(response, options){ } }); // document.location = '/gedeo/amenagement/genererpdf/array/'+jsonLstIds; }
Thanks
-
19 Nov 2012 7:20 AM #2
For reformulate my question,
How can we use document.location in Ext.Ajax.Request .?
Code:Ext.Ajax.request({ url : '/gedeo/amenagement/genererpdf/array/'+jsonLstIds, //document.location = '/gedeo/amenagement/genererpdf/array/'+jsonLstIds; params : { array : jsonLstIds }, success : function(response, opts){ box.hide(); }, failure : function(response, options){ },
-
21 Nov 2012 8:04 AM #3Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
- Answers
- 3160
Have you looked at what document.location gives you? It's not a string
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
21 Nov 2012 8:18 AM #4
Thx , Sorry I am new in ExtJS4 so I get some problem
So, there is no solution for doint 'document.location ' in Ext.Ajax.Request.;
I need it
Thx
-
21 Nov 2012 8:20 AM #5Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
- Answers
- 3160
There definitely is, open up the dev tools of your browser and in the console type document.location and expand it to see what it has. It's basically an object. So you can do document.location.origin for example.
Also, this isn't Ext JS code, this is native javascript.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
21 Nov 2012 8:26 AM #6


Reply With Quote