PDA

View Full Version : How to call serverSide method from javascript



designworxz
Mar 09, 2009, 11:09 PM
How to call serverSide method from javascript

Am doing this




var cellClick = function(grid, rowIndex, columnIndex, e) {
var t = e.getTarget();
var record = grid.getStore().getAt(rowIndex); // Get the Record
var columnId = grid.getColumnModel().getColumnId(columnIndex); // Get column id


if (t.className == 'imgEdit' && columnId == 'Preview') {
WndP.show();


}



After WndP.show i want to call server Side Method

geoffrey.mcgill
Mar 09, 2009, 11:30 PM
Hi designworxz,

Sounds like you need an AjaxMethod, see http://examples1.ext.net/#/Events/AjaxMethods/Overview/


Hope this helps.

designworxz
Mar 10, 2009, 12:26 AM
But that can be called through handler.

How can i call that handler from Javascript to execute Server Side Method.
My problem is when clicking on details Column in GridView Panel. I want to get record
and based on record i want to display html file in popup window.

i dont know how to implement this

if (t.className == 'imgEdit' && columnId == 'Preview') {
WndP.show();

=======Here Call to server Method passing record=======