Skinnysite.net

... un modo di esprimersi.

Font Size

Cpanel

Homa Page di Daniele Franceschini

Funzione parametrizzata per l'apertura di una nuova finestra HTML.

Valutazione attuale:  / 0
ScarsoOttimo 

Questa piccola funzione, completamente parametrizzata, permette di aprire una nuova finestra HTML.


function openNewWnd(sUrl,w,h,t,l,tbar,loc,stat,mbar,sbar,resiz,sCenter)
{
if (sUrl != '')
{
if (sCenter=='s'){
var l = (screen.width) ? (screen.width-width)/2 : 0;
var t = (screen.height) ? (screen.height-height)/2 : 0;
}
var sFeatures = '';
sFeatures = 'width='+w+',height='+h+',top='+t+',left='+l+',toolbar='+tbar+',
location='+loc+',directories=0,status='+stat+',menuBar='+mbar+',scrollBars='+sbar+',
resizable='+resiz;
var wnd =window.open(sUrl, '', sFeatures);
wnd.focus();
}
}

Sei qui: Home Code Snippets Javascript Funzione parametrizzata per l'apertura di una nuova finestra HTML.