extdemo.js 770 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. Define namespace FPC
  3. */
  4. Ext.ns('FPC');
  5. /*
  6. Include our server-side Ext.Direct API; The default name 'FPWeb' was used
  7. */
  8. Ext.Direct.addProvider(FPWeb);
  9. /*
  10. Callback used to process result. It will show the actual page
  11. */
  12. FPC.ShowResult = function (Provider,Response) {
  13. var panel = new Ext.Panel({
  14. renderTo: Ext.getBody(),
  15. frame: true,
  16. title: "Adding 1.2 and 3.4 = " + Response.result,
  17. height: 50,
  18. width: 200,
  19. html: "The result is : " + Response.result
  20. });
  21. panel.show();
  22. }
  23. /*
  24. onReady callback function
  25. */
  26. FPC.ShowPage = function () {
  27. /*
  28. Call our API, using FPC.ShowResult as the callback to process the result
  29. */
  30. DemoClass.Add(1.2, 3.4, FPC.ShowResult);
  31. }
  32. /*
  33. Start Extjs
  34. */
  35. Ext.onReady(FPC.ShowPage);