0 Replies Latest reply on Sep 26, 2006 1:26 AM by Srihari_Ainumpudi

    calling HttpService from JavaScript

    Srihari_Ainumpudi
      Hi,

      My requirement is when i close the browser, from javascript i want to call java application using HttpService in Flex Application.
      I am using FaBridge to call java application using HttpService from javaScript.

      JavaScript code snippet
      ----------------------------------

      var flexApp = null;
      var initCallback = function()
      {
      flexApp = FABridge.flash.root();
      }
      FABridge.addInitializationCallback("flash",initCallback);


      function saveChanges() {
      if (flexApp!= null) {
      var dataChangedFlag = flexApp.dataChangedFlag();
      if(dataChangedFlag) {
      var closeWin = window.confirm("Do you want to save your changes?");
      if (true) {
      flexApp.httpService.request.reqParamMode="saveChanges";
      flexApp.setUnSavedDataAsXML();
      flexApp.httpService.send();
      flexApp.closeWindow();
      alert('done...');
      }
      }
      }

      Code is failing to identify httpService object.
      Any help is Appreciated........

      Regards,
      sainumpudi