Jscript application level array

Results 1 to 2 of 2

Thread: Jscript application level array

  1. #1
    Join Date
    Dec 1969

    Default Jscript application level array

    How can we create an array of 50 names as<BR>an application level variable in javascript global.asa<BR>and modify it in the application pages.

  2. #2
    Join Date
    Dec 1969

    Default I don't think you can...

    A JScript array is *NOT* a SafeArray and thus can&#039;t be saved in a Session or Application variable, which only allows for storage of legit COM objects.<BR><BR>HOWEVER...<BR><BR>You *could* simply do this:<BR><BR>var names = new Array("ann","arnie","babs","bev","bill",....);<BR> ...<BR>Application("allNames") = names.join( "###" );<BR><BR>And then you convert it back to an array as needed:<BR><BR>var theNames = (Application("allNames")).split( "###" );<BR><BR>Hey?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts