页面向flex 传值

页面向flex 传值

function popupBatch(pno,bno) {
   var popup_width = 1000;
   var popup_height = 540;
   var popup_left = (screen.width - popup_width) / 2;
   var popup_top = (screen.height - popup_height) / 2;
   var popup_scrollbars = "no";
 
   var popup_property = "width=" + popup_width;
   var popup_property = popup_property + ",height=" + popup_height;
   var popup_property = popup_property + ",left=" + popup_left;
   var popup_property = popup_property + ",top=" + popup_top;
   var popup_property = popup_property + ",scrollbars=" + popup_scrollbars;

   window.open('http://220.117.240.106:8180/flexApp/BatchForFront.html?pno='+pno+'&bno='+bno,'batchinfo',popup_property);
 }


public function init():void{
    var args:Object = getParams();
    if(args.pno == "" || args.bno == "") {
     Alert.show( "parameters error!");
    }   
    this._pNo = args.pno;//parseInt( parameters.pno );
    this._bNo = args.bno;//parseInt( parameters.bno );
    ro.findAll(pNo,bNo);
   }

private function getParams():Object {
    params = {};
    var query:String = ExternalInterface.call("window.location.search.substring", 1);
    if(query) {
     var pairs:Array = query.split("&");
     for(var i:uint=0; i < pairs.length; i++) {
      var pos:int = pairs[i].indexOf("=");
      //Alert.show(String(pos));
      if(pos != -1) {
       var argname:String = pairs[i].substring(0, pos);
       var value:String = pairs[i].substring(pos+1);
       
       params[argname] = value;
      }
     }
    }
    return params;
   }

你可能感兴趣的:(页面向flex 传值)