Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
<%=links(HTMLDecode("codigo_chat"))%> Pessoal o problema acho que está aqui, está retornando este erro
O item não pode ser encontrado na coleção correspondente ao nome ou ao ordinal solicitado,será que eu chamei a função HTMLDECODE errado ?
A função está logo Abaixo:
<%
Function HTMLDecode(ByVal EncodedString)
'Declarations
Dim ret
Dim i
'Decoding
ret = EncodedString
ret = Replace( ret, """, chr(34) )
ret = Replace( ret, "<" , chr(60) )
ret = Replace( ret, ">" , chr(62) )
ret = Replace( ret, "&" , chr(38) )
ret = Replace( ret, " ", chr(32) )
For i = 1 to 255
ret = Replace( ret, "" & i & ";", chr( i ) )
Next
'Return
HTMLDecode = ret
End Function
%>
<%
abreconexao
sql1="select *from chat where status_chat='sim'"
set configchat=conexao.execute(sql1)
do while not configchat.eof
%>
<%=links(HTMLDecode("codigo_chat"))%> Pessoal o problema acho que está aqui, está retornando este erro
O item não pode ser encontrado na coleção correspondente ao nome ou ao ordinal solicitado,será que eu chamei a função HTMLDECODE errado ?
<%
configchat.movenext
%>
<%
loop
fechaconexao
%>
Resolvido Pessoal
Estava Puxando a Função Assim : <%=links(HTMLDecode("codigo_chat"))%>
O Correto é Assim: <%=HTMLDecode(links("codigo_chat"))%>
Fiz poucas alterações no HTMLDECODE, PQ EU PRECISAVA DA ASPAS SIMPLES '
<%
Function HTMLDecode(sText)
Dim regEx
Dim matches
Dim match
sText = Replace(sText, """, Chr(34))
sText = Replace(sText, "<" , Chr(60))
sText = Replace(sText, ">" , Chr(62))
sText = Replace(sText, "&" , Chr(38))
sText = Replace(sText, " ", Chr(32))
sText = Replace(sText, "'", Chr(39))
sText = Replace(sText, "'", Chr(39))
sText = Replace(sText, "'", "'")
Set regEx= New RegExp
With regEx
.Pattern = "(\d+);" 'Match html unicode escapes
.Global = True
End With
Set matches = regEx.Execute(sText)
'Iterate over matches
For Each match in matches
'For each unicode match, replace the whole match, with the ChrW of the digits.
sText = Replace(sText, match.Value, ChrW(match.SubMatches(0)))
Next
HTMLDecode = sText
End Function
%>