Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    Sostituire codice ad iframe

    Ciao a tutti)
    in una pagina asp ho il seguente codice:

    Sub DisplayDynamicCounter()
    Dim iAuthent, iAnonymous
    Dim oCn, oRs, rSQL

    Set oCn = DBConnexion(DB_MAIN)
    rSQL = "SELECT Count(*) FROM sessions"
    Set oRs = DBRecordSet(oCn, rSQL)
    iAnonymous = oRs(0)
    oRs.Close
    Set oRs = Nothing

    rSQL = "SELECT Count(*) FROM sessions WHERE sLogin<>''"
    Set oRs = DBRecordSet(oCn, rSQL)
    iAuthent = oRs(0)
    oRs.Close
    Set oRs = Nothing

    oCn.close
    Set oCn = Nothing

    CreateTopTable "NbVisitors", GetTranslation("LANG_VISITORS")

    Response.Write "<span class=""current""><div align=""left"">"

    Response.Write Replace(Replace(GetTranslation("LANG_CURRENT_VISIT ORS"), "%1%", iAnonymous), "%2%", iAuthent) & vbCrlf
    If sPseudo <> "" Then
    Response.Write " - " & GetTranslation("LANG_MORE_INFORMATION") & "" & vbCrlf
    End If
    Response.Write "</div></span>" & vbCrlf

    If bDisplayIframe Then
    Response.Write "<center><iframe class=""vf"" src=""onlinemembers.asp"" name=""online"" width=""130"" height=""100"" align=""center"" frameborder=""0"" scrolling=""auto"" marginwidth=""0"" marginheight=""0"" ></iframe></center>" & vbCrlf
    Else
    OnlineMembers
    End If
    CreateBottomTable ""
    End Sub



    mentre nella pagina onlinemembers.asp ho il seguente codice:

    <%
    sub DoOnlineMembersPre(interval)
    sTheme = GetAndSetTheme()
    Response.Write "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.01 Transitional//EN"">" & vbCRLF
    Response.Write "<html>" & vbCRLF
    Response.Write "<head>" & vbCRLF
    %>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function reload() {
    document.location.href=document.location.href;
    }
    setTimeout('reload()',<%=interval%>000);
    //-->
    </SCRIPT>
    <%
    Response.Write "<title>" & GLOBAL_SITE_NAME & "</title>" & vbCRLF
    Response.Write "<link rel=""stylesheet"" href=""" & GLOBAL_SITE_THEMES_PATH & sTheme & "/default.css"" type=""text/css"">" & vbCRLF
    Response.Write "</head>" & vbCRLF
    Response.Write "<body leftmargin=""10"" rightmargin=""10"" alink=""#0000ff"" vlink=""#0000ff"" link=""#0000ff"" topmargin=""0"" bottommargin=""0"" marginheight=""0"" marginwidth=""0"">" & vbCRLF
    Response.Write "<table class=""online""> <tr> <td>"
    end sub

    sub DoOnlineMembersPost()
    Response.Write "<td></tr></table>" & vbCRLF
    Response.Write "</body>" & vbCRLF
    Response.Write "</html>" & vbCRLF
    end sub
    %>

    Quello che vorrei fare e togliere l'iframe che richiama la seconda pagina e sostituire ad esso il contenuto della pagina stessa..credo che alla fine non ci dovrebbero essere problemi.. Io ho provato a farlo ma si vede che commetto qualche errore di sintassi e alla fine non parte. Qualche anima pia vorrebbe scrivere questo per me?
    Saluti,
    Carlo

  2. #2
    magari se ci dici quali sono gli errori e ci fai vedere la descrizione degli stessi mostrata sul browser...

  3. #3
    ok, allora io ho fatto così...
    in cima alla prima pagina ho incluso il file della seconda, cioè ho messo



    poi nella seconda al posto di




    If bDisplayIframe Then
    Response.Write "<center><iframe class=""vf"" src=""onlinemembers.asp"" name=""online"" width=""130"" height=""100"" align=""center"" frameborder=""0"" scrolling=""auto"" marginwidth=""0"" marginheight=""0"" ></iframe></center>" & vbCrlf

    Else
    OnlineMembers
    End If
    CreateBottomTable ""
    End Sub


    ho messo


    If bDisplayIframe Then
    Response.Write "<table width=""130px"" height=""100px""><tr><td height=""100px"">" & vbCrlf
    DoOnlineMembersPost()
    Response.Write "</td></tr></table>" & vbCRLF
    Else
    OnlineMembers
    End If
    CreateBottomTable ""
    End Sub


    ma la visualizzazione della pagina appare totalmente sconvolta.
    Saluti,
    Carlo

  4. #4
    ok ho risolto,
    avevo confuso due files dal nome simile, ora funge!


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.