views:

15

answers:

1

Hello All,

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 location = 0, which i think it should correct. But i still get the location bar in my pop up window.

A: 

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

greg