Re: Session variables and arrays




"sjsean" <SJSean95126@xxxxxxxxx> wrote in message
news:1182991830.804241.313250@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
All thanks in advance for reading my post. I am new to using js and
more accustomed to vbscript.

I had written code which created a shopping cart into an array using
vbscript and then transferred the information into a session
variable. However what I didn't know was that deleting/manipulating
information in an array using vbscript was not that easy.

In doing some reading and research it seemed that js was more flexible
in this area. My questions:

1) if I want to store cart items/details in an array and session
variable do I need to use only js (and can not switch back and forth
from vbscript and js)

2) if I have an array 6x12 and want to delete all the items
associated with say arrayItem[1, 0...12] what is the proper coding to
delete...is it splice?

3) any good articles about js, arrays, and multidimensional arrays
for a beginner?

sean

You're alluding to ASP programming, which is server-side. I believe the main
focus of this group is Client-Side Javascript.
Although you can use Javascript ( JScript) in lieu of VBScript for your ASP,
there's no need to switch from VBScript soley for handling a rectangular
array. If you're accustomed to the first element having an index of 1, and
accustomed to being able to ReDim your array, you may find the learning
curve switching to JScript a bit steeper than you may have anticipated. You
may ask yourself, for example, why do I want to delete elements of an array
in the first place.




.



Relevant Pages

  • Re: VBscript Array Split Function
    ... inputted into an array so that each separate character in the array is ... make sense and can't be handled properly by VBScript. ... Dim strValue, strChar, k, arrChars() ...
    (microsoft.public.scripting.vbscript)
  • Re: problems with binary types in an ADO recordset
    ... I'm having problems extracting values from binary types in VBscript. ... You can't directly address individual array elements, ... Dim strTemp ... ' Convert Byte-Array to VBScript ANSI string. ...
    (microsoft.public.scripting.vbscript)
  • still looking for real solution to VBScript->C# array params
    ... say to declare the incoming array param as an object rather than an array -- ... curious "variable uses an automation type not supported in VBScript" error. ... servers and have existing ASP code work as-is. ... It was bad enough I had to change all of my string params to object ...
    (microsoft.public.dotnet.framework.interop)
  • Re: problems with binary types in an ADO recordset
    ... VBScript has some support for arrays of bytes, but it is very limited, and doesn't work at all like arrays of variants. ... You can't directly address individual array elements, ... Dim strTemp ... My advice would honestly be to not use binary data in VBScript unless you can treat it as an opaque blob of bytes. ...
    (microsoft.public.scripting.vbscript)
  • Re: Make vbScript An Exe
    ... The problem is I don't know vb at all, and I'm pretty good at vbscript. ... an array for reference ... Call GetGroupInfo ' Fill the array with Group Membership ... Sub GetGroupInfo() ...
    (microsoft.public.vb.general.discussion)