ここの誰かがASPコレクションをJavascriptコレクションに保存する方法を知っていますか?以前の投稿からコードを取得しましたが、機能しませんでした。コードを間違った場所に配置したに違いありません。
現在、ドキュメントの準備が整うと、ASPコレクションの各変数が一度に1つずつ下に移動するアプリを開発しています。slideDownイベントがあるため、jqueryを使用して各値をスライドダウンすることにしました。しかし、私が下にスライドすると、コレクションのアイテムがすべて同時に下にスライドします。ここの誰かがこれを行う方法についてのアイデアやこれを行うためのより良い方法についての提案を持っていますか?
<%
Dim objDictionary, Key,searchWord, myVar,a,i, break
searchWord = request.QueryString("searchWord")
Set objDictionary = CreateObject("Scripting.Dictionary")
objDictionary.CompareMode=1
objDictionary.Add "Hello","hello"
objDictionary.Add "Age","age"
objDictionary.Add "height","height"
objDictionary.Add "sample","sample"
objDictionary.Add "words","words"
Response.Write "<div id='toFall'>"
if objDictionary.Exists(searchWord) then
objDictionary.Remove(searchWord)
a = objDictionary.Keys
for i=0 to objDictionary.Count-1
Response.Write( "<div class='fall'>" + a(i))
Response.write("<br />")
Response.write("</div>")
next
set objDictionary=nothing
else
a = objDictionary.Keys
for i=0 to objDictionary.Count-1
Response.Write( "<div class='fall'>" + a(i))
Response.write("<br />")
Response.write("</div>")
next
set objDictionary=nothing
end if
Response.write "</div>"
'got this code from my previous post but didn't got it working
Sub CollectionToJavaScript(oCollection, sClientSideName)
Dim blnFirst
blnFirst = True
Response.Write("<" & "script" & " type=""text/javascript"">")
Response.Write("var " & sClientSideName & " = {")
For Each key In objDictionary.Keys
If Not(blnFirst) Then Response.Write(", ")
Response.Write( key & ": " & objDictionary(key) )
blnFirst = false
Next
Response.Write("};")
Response.Write("</" & "script>")
Call CollectionToJavaScript (objDictionary, "myCollection")
End Sub
%>