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

    error '800a000d'.. boh?

    Date uno sguardo a questo errore.... a me sembra strano!
    Ho scaricato uno script e lo voglio adattare alle mie esigenze, ma quando va a leggere mi dà:

    Errore di run-time di Microsoft VBScript error '800a000d'

    Tipo non corrispondente: 'TrimBody'


    Qualcuno può dirmi qualcosa?
    Grazie
    Pochi sanno, molti presumono di sapere.

  2. #2
    Si, il codice della pagina?

  3. #3
    Emmh...!


    <SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
    function Thumbnail(tmb_suff,tmb_filename)
    Dim tmb_NewFilename, tmb_Path, tmb_PosPath, tmb_PosExt
    if not isnull(tmb_filename) then
    tmb_PosPath = InStrRev(tmb_filename,"/")
    tmb_Path = ""
    if tmb_PosPath > 0 then
    tmb_Path = mid(tmb_filename,1,tmb_PosPath)
    end if
    tmb_PosExt = InStrRev(tmb_filename,".")
    if tmb_PosExt > 0 then
    tmb_NewFilename = tmb_Path & mid(tmb_filename,tmb_PosPath+1,tmb_PosExt-(tmb_PosPath+1)) & tmb_suff & ".jpg"
    else
    tmb_NewFilename = tmb_Path & mid(tmb_filename,tmb_PosPath+1,len(tmb_filename)-tmb_PosPath) & tmb_suff & ".jpg"
    end if
    end if
    Thumbnail = tmb_NewFilename
    end function
    </SCRIPT>
    <SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
    function DoTrimProperly(str, nNamedFormat, properly, pointed, points)
    dim strRet
    strRet = Server.HTMLEncode(str)
    strRet = replace(strRet, vbcrlf,"")
    strRet = replace(strRet, vbtab,"")
    If (LEN(strRet) > nNamedFormat) Then
    strRet = LEFT(strRet, nNamedFormat)
    If (properly = 1) Then
    Dim TempArray
    TempArray = split(strRet, " ")
    Dim n
    strRet = ""
    for n = 0 to Ubound(TempArray) - 1
    strRet = strRet & " " & TempArray(n)
    next
    End If
    If (pointed = 1) Then
    strRet = strRet & points
    End If
    End If
    DoTrimProperly = strRet
    End Function
    </SCRIPT>
    <%
    Dim rsLastestNews
    Dim rsLastestNews_numRows

    Set rsLastestNews = Server.CreateObject("ADODB.Recordset")
    rsLastestNews.ActiveConnection = MM_connDUportal_STRING
    rsLastestNews.Source = "SELECT * FROM DATAS, CHANNELS, CATEGORIES WHERE CAT_CHANNEL = CHA_ID AND DAT_CATEGORY = CAT_ID AND DAT_APPROVED=1 AND CHA_ACTIVE = 1 AND CHA_NAME = 'NEWS' ORDER BY DAT_DATED DESC"
    rsLastestNews.CursorType = 0
    rsLastestNews.CursorLocation = 2
    rsLastestNews.LockType = 1
    rsLastestNews.Open()

    rsLastestNews_numRows = 0
    %>

    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#204066">
    <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="10"></td>
    <td align="left" valign="middle" background="/images/menu_arancio.gif" class="textBoldColor"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">LATEST
    NEWS
    </font></td>
    <td width="28" align="right" valign="middle"></td>
    </tr>
    </table></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="1" class="bgTableBorder">[img]/images/0.gif[/img]</td>
    <td align="left" valign="top" class="bgTable"> <% If Not rsLastestNews.EOF Or Not rsLastestNews.BOF Then %>
    <table width="100%" border="0" cellspacing="2" cellpadding="2">
    <tr>
    <td align="left" valign="top" class="text">&iCat=<%=(rsLastestNews.Fields.Item("DAT_CATEGORY" ).Value)%>&iChannel=<%=(rsLastestNews.Fields.Item( "CAT_CHANNEL").Value)%>&nChannel=<%=(rsLastestNews .Fields.Item("CHA_NAME").Value)%>">[img]../pictures/<%= Thumbnail([/img]" border="1" align="right" alt="<%=(rsLastestNews.Fields.Item("DAT_NAME").Val ue)%>"><strong class="textBoldColor">&iCat=<%=(rsLastestNews.Fields.Item("DAT_CATEGORY" ).Value)%>&iChannel=<%=(rsLastestNews.Fields.Item( "CAT_CHANNEL").Value)%>&nChannel=<%=(rsLastestNews .Fields.Item("CHA_NAME").Value)%>"><%=(rsLastestNe ws.Fields.Item("DAT_NAME").Value)%>[/b]
    <% =TrimBody(DoTrimProperly((rsLastestNews.Fields.Ite m("DAT_DESCRIPTION").Value), 600, 1, 1, " ... ")) %> </td>
    </tr>
    </table>
    <% End If ' end Not rsLastestNews.EOF Or NOT rsLastestNews.BOF %> </td>
    <td width="1" class="bgTableBorder">[img]/images/0.gif[/img]</td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td align="center" valign="top" background=""></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td height="7" align="left" valign="top">[img][/img]</td>
    </tr>
    </table>
    <%
    rsLastestNews.Close()
    Set rsLastestNews = Nothing
    %>
    Pochi sanno, molti presumono di sapere.

  4. #4
    sbaglio o la funzione TrimBody non è definita da nessuna parte nello script? controlla che non ti sia scordato di copiare qualche parte di script

  5. #5
    Grazie Santino83,

    era proprio quella la ragione. La funzione era dichiarata in un file "Includes" che non avevo visto.

    Grazie di nuovo e buona serata
    Pochi sanno, molti presumono di sapere.

  6. #6
    Prego

    se per caso ti intendi di query dammi una mano nel mio post

    buona serata

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.