| Asprogx | 16.12.2004 - 10:10:03 |
| merhaba herkese
phpBB forumda sayfayı yenilemeden özel mesaj geldiğini belirten pop-up pencere açılıyor bunu nasıl yapabiliriz? Java Script Kodunu Bilen varmı? Teşekkürler ![]() | |
| muskut | 17.12.2004 - 01:24:55 |
| mesela bir linke tıkladığında, sayfanın ortasında, özelliklerini (boyutları, genişletip genişletilemeyeceğini, tam ekran açılıp açılamayacağını v.b) belirleyeceğin bir örnek veriyorum.
linkin arkasındaki kod satırı: <a href="#" onClick="GP_AdvOpenWindow('index.asp','','fullscreen=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no',200,200,'center','ignoreLink','',0,'borderless');return document.MM_returnValue">link</a> JavaScript koduda burada: <script language="JavaScript" type="text/JavaScript"> <!-- function GP_AdvOpenWindow(theURL,winName,features,popWidth,popHeight,center,ignorelink,alwaysOnTop,autoCloseTime,borderless) { //v1.1 var autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340; if (popWidth > 0) features += (features.length > 0 ? ',' : '') + 'width=' + popWidth; if (popHeight > 0) features += (features.length > 0 ? ',' : '') + 'height=' + popHeight; if (center && center != "" && popWidth > 0 && popHeight > 0) { if (document.all || document.layers || document.getElementById) { w = screen.availWidth; h = screen.availHeight;} var leftPos = (w-popWidth)/2, topPos = (h-popHeight)/2; features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;} if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) features+=",fullscreen=1"; popupWindow = window.open(theURL,winName,features); if (popupWindow.opener == null) popupWindow.opener = self; if (document.all || document.layers || document.getElementById) { if (borderless && borderless != "") {popupWindow.resizeTo(popWidth,popHeight); popupWindow.moveTo(leftPos, topPos);} if (alwaysOnTop && alwaysOnTop != "") { ontopIntervalHandle = popupWindow.setInterval("window.opener.popupWindow.focus();", 50); popupWindow.document.body.onload = function() {popupWindow.setInterval("window.opener.popupWindow.focus();", 50);}; } if (autoCloseTime && autoCloseTime > 0) { popupWindow.document.body.onbeforeunload = function() { if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle); window.onbeforeunload = null; } autoCloseTimeoutHandle = window.setTimeout("popupWindow.close()", autoCloseTime * 1000); } window.onbeforeunload = function() {popupWindow.close();}; } document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true; } //--> </script> Not : HUSONET Tarafından Code Taglarına alınmıştır. | |
| Asprogx | 18.12.2004 - 10:31:09 |
| Teşekkürler | |