开发者

Ajax callback pop up window

开发者 https://www.devze.com 2023-01-16 20:36 出处:网络
I have an Ajax callback function, which will load a html file and pop up the content of this HTMl file in a pop up window.

I have an Ajax callback function, which will load a html file and pop up the content of this HTMl file in a pop up window.

It works so far, however, i want to get rid of the location bar in the pop up window. Here is my code

function _checkPopUpUpdate() { var callback=new Object(); callback.success=this.onExternalSuccess; callback.failure=this.onExternalFailure; YAHOO.util.Connect.asyncRequest('GET','/ci/ajaxCustom/ajaxCheckPopupUpdate',callback); };

function onExternalSuccess (o){

if(o.responseText!==undefined)
{
    var str=o.responseText;
    //document.getElementById('updateContent').innerHTML=str;
      if(str !== 'no update') // Then pop up.
      {
      L=screen.width-200;
      T=screen.height;
      **popup=window.open(str,"","alwaysRaised=yes,status=no,toolbar=no,location=no,menubar=no,directories=no,resizable=no,scrollbars=no,height=80,width=210,left="+L+",top="+T);**
      for (i=0;i<200;i++)
      {
         T=T-1;
          popup.moveTo(L,T);
      }
    }
} };

function onExternalFailure (o) { alert("fail"); };

So, i have the loca开发者_如何学运维tion = 0, which i think it should correct. But i still get the location bar in my pop up window.


Some browsers don't let you remove it. Some browsers have a setting that will disable removing it. Theres no reliable way to remove the location bar. You can test various browsers here: http://www.quirksmode.org/js/popup.html

0

精彩评论

暂无评论...
验证码 换一张
取 消