Visualizzazione dei risultati da 1 a 3 su 3

Discussione: chiusura banner

  1. #1
    Utente di HTML.it
    Registrato dal
    Jul 2003
    Messaggi
    583

    chiusura banner

    questo script










    <%
    sql = "select * from testohome where id1 = '6' "

    Set rec = Server.CreateObject("ADODB.Recordset")
    rec.cursorlocation = 3
    rec.Open sql, conn

    %>


    <%
    If Rec("testohome1")<>"" then
    %>

    <script type="text/JavaScript">
    <!--
    function MM_openBrWindow(theURL,winName,features) { //v2.0
    window.open(theURL,winName,features);
    }
    function GP_AdvOpenWindow(theURL,winName,features,popWidth, popHeight,winAlign,ignorelink,alwaysOnTop,autoClos eTime,borderless) { //v2.0
    var leftPos=0,topPos=0,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 (winAlign && winAlign != "" && popWidth > 0 && popHeight > 0) {
    if (document.all || document.layers || document.getElementById) {w = screen.availWidth; h = screen.availHeight;}
    if (winAlign.indexOf("center") != -1) {topPos = (h-popHeight)/2;leftPos = (w-popWidth)/2;}
    if (winAlign.indexOf("bottom") != -1) topPos = h-popHeight; if (winAlign.indexOf("right") != -1) leftPos = w-popWidth;
    if (winAlign.indexOf("left") != -1) leftPos = 0; if (winAlign.indexOf("top") != -1) topPos = 0;
    features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;}
    if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) features+=",fullscreen=1";
    if (window["popupWindow"] == null) window["popupWindow"] = new Array();
    var wp = popupWindow.length;
    popupWindow[wp] = window.open(theURL,winName,features);
    if (popupWindow[wp].opener == null) popupWindow[wp].opener = self;
    if (document.all || document.layers || document.getElementById) {
    if (borderless && borderless != "") {popupWindow[wp].resizeTo(popWidth,popHeight); popupWindow[wp].moveTo(leftPos, topPos);}
    if (alwaysOnTop && alwaysOnTop != "") {
    ontopIntervalHandle = popupWindow[wp].setInterval("window.focus();", 50);
    popupWindow[wp].document.body.onload = function() {window.setInterval("window.focus();", 50);}; }
    if (autoCloseTime && autoCloseTime > 0) {
    popupWindow[wp].document.body.onbeforeunload = function() {
    if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle);
    window.onbeforeunload = null; }
    autoCloseTimeoutHandle = window.setTimeout("popupWindow["+wp+"].close()", autoCloseTime * 1000); }
    window.onbeforeunload = function() {for (var i=0;i<popupWindow.length;i++) popupWindow[i].close();}; }
    document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true;
    }
    //-->
    </script>
    <map id="MapPEC" name="MapPEC">
    <area shape="rect" coords="1,0,897,149" href="http://analytics.arubamediamarketing.it/link_outbound/?cvtrac=17&usc=d645920e395fedad7bbbed0eca3fe2e0" alt="Ordina Subito" title="">
    </map>

    <script type="text/javascript">

    function closeDiv()
    {
    document.getElementById("chat").style.display="non e";
    }

    window.onload = function()
    {
    var el = document.getElementById("chat");

    if (el)
    el.style.display = "block";
    }
    window.setTimeout("closeDiv();", 20000);

    </script>
    <div style="position: absolute; height: 270px; width: 220px; text-align: center; z-index: 100; top: 200px; left: 800px;" id="chat">
    <table cellspacing="0" cellpadding="0" bgcolor="#c0c0c0" border="1" bordercolor="#000000">
    <tr>
    <td width="220">
    <table cellspacing="0" cellpadding="0">
    <tr>
    <td width="210" height="168" align="center" valign="top"><font color="000000" face="Verdana" size="3">
    <a onclick="close();"><%=rec("testohome1")%></a></font>
    </td>

    </tr>
    </table>
    </td>

    </tr>
    </table>
    </div>


    <% else %>

    <% end if %>



    si chiude automaticamente funziona a meraviglia gli ho fatto anche il coll.to con il db


    ma la mia domanda è questa posso inserire una croce in alto e se la clicco si chiude quel div

    <a onclick="close();"><%=rec("testohome1")%></a>


    ho provato ma nn va


    se ci aggiungo il window mi si chiude tutta la finestra

    fatemi sapere
    grazie dell'aiuto

  2. #2
    Moderatore di JavaScript L'avatar di br1
    Registrato dal
    Jul 1999
    Messaggi
    19,998
    A "naso" dato che in quel bailame di codice lato server e' arduo cavarne significato

    <a href="#" onclick="closeDiv();return false">
    Il guaio per i poveri computers e' che sono gli uomini a comandarli.

    Attenzione ai titoli delle discussioni: (ri)leggete il regolamento
    Consultate la discussione in rilievo: script / discussioni utili
    Usate la funzione di Ricerca del Forum

  3. #3
    Utente di HTML.it
    Registrato dal
    Jul 2003
    Messaggi
    583
    perfetto funzia grazie 1000

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.