Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8461491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:53:42+00:00 2026-06-10T13:53:42+00:00

anyone here knows how to store ASP collection to Javascript collection? I got a

  • 0

anyone here knows how to store ASP collection to Javascript collection? I got a code from my previous post but didn’t put it to work i must have put the codes in the wrong places.

Im currently developing an app wherein once the document is ready each variable from the ASP colection will move down one at a time. I decided to use jquery to slide down each value since it has a slideDown event. but when i slide down the items from the collection slides down all at the same time. anyone here has an idea on how to do this or suggestions on a better way to do this?

<%

        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



        %>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:53:44+00:00Added an answer on June 10, 2026 at 1:53 pm

    There were several mistakes in your code:

    1. You were setting the dictionary object to nothing before you called your CollectionToJavaScript sub
    2. You needed to use oCollection within the CollectionToJavaScript sub
    3. The postioning of
      Response.Write( key & “: ” & objDictionary(key) )
      blnFirst = false

      <%    
      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                    
      
      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                   
      
      end if                
      
      Response.write "</div>"   'got this code from my previous post but didn't got it working           
      
      Sub CollectionToJavaScript(ByRef oCollection, sClientSideName)              
      Dim blnFirst             
      blnFirst = True             
      
          Response.Write("<" & "script" & " type=""text/javascript"">")             
          Response.Write("var " & sClientSideName & " = {")             
      
          For Each key In oCollection.Keys                 
          If Not(blnFirst) Then 
              Response.Write(", ")                       
          End If    
          Response.Write( key & ": " & oCollection(key) )     
          blnFirst = false       
          Next   
      
      Response.Write("};")             
      Response.Write("</" & "script>")             
      End Sub          
      
      Call CollectionToJavaScript (objDictionary, "myCollection")    
      
      set objDictionary=nothing      
      
      %>
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know I can get answers here but I was wondering if anyone knows
Does anyone knows how to code this? Here is the game description: 3 images
Does anyone here know of a Javascript application (something similar to Lightbox, only not
Looking through the massive android source code, anyone on here who know where exactly
Aside from scalability issues, has anyone here actually stumbled upon a web-development problem where
Here is my code I'm trying to use to store the ip address of
Does anyone know what is going on here? When I pressed the key once,
Does anyone here use phpmailer? I downloaded the files for phpmailer 5.2.1 (the newest
Has anyone here created a Flash site or application that is ADA (Section 508)
Can anyone here help me with the integration of the DailyMotion API? I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.