Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

« Newer Snippets
Older Snippets »
2 total  XML / RSS feed 

pop window desde un link

// esta es una forma muy buena de hacer un pop up desde un link

<a href="http://google.com/" onclick="window.open(this.href, 'popupwindow', 
  'width=400,height=300,scrollbars,resizable'); 
  return false;"
>

Javascript Popup Function

// javascript popup

function popUp(url,added) {
                
        menubar = "no";
        if (added == "nav") {menubar = "yes";}

        if (typeof(popupWin) != "object"){
                popupWin = window.open(url,"gmail" , "height=400,width=600,toolbar=" + menubar + ",scrollbars=yes,personalbar=yes,resizable=yes,location=0,statusbar=yes,menubar=0");
        } else {
        if (!popupWin.closed){
                popupWin.location.href = url;
        } else {
                popupWin = window.open(url, "gmail" , "height=400,width=600,toolbar=" + menubar + ",scrollbars=yes,personalbar=yes,resizable=yes,location=0,statusbar=yes,menubar=0");
        }
        }
        popupWin.focus();
        return false;
}
« Newer Snippets
Older Snippets »
2 total  XML / RSS feed