i may have the wrong end of the stick as i dont know about javascript asp
but in normal javascript 
the split function is used to split a string into an array
eg 
somestring="this,that,theother"
myarray=somestring.split(',')


-----Original Message-----
From: Peter Harrison [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 25, 2002 5:35 PM
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] OT: please help!


Right, I think I know what's happening now.

On first use the Session variable is an array. When the page is reloaded it
thinks the Session variable is a single string which happens to contain
comma-separated values.

I'm going to have to reconstruct the array every time I need to use the
Session string as an array.

Is there an equivalent listtoarray function in JavaScript ASP?

FFS!!!!!!!!!!! ^%$^$^%$^%$�"$�"$�"�!

- Peter "Hairless and missing CF" Harrison

-----Original Message-----
From: Russ 'Snake' Michaels [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2002 17:24
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] OT: please help!


you u can display it just not splice it ?


-----Original Message-----
From: Peter Harrison [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2002 17:23
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] OT: please help!


ok, it exists between pages. (commenting out the splice line proves that)

What would I put in the global.asa to declare that session variable?

Thanks.

- Peter "Hairless" Harrison


-----Original Message-----
From: Russ 'Snake' Michaels [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2002 17:06
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] OT: please help!


are you sure it exists and is being saved from the last page, can u display
it. Have you setup sessions in your global.asa

-----Original Message-----
From: Peter Harrison [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2002 16:56
To: Dev@Lists. Cfdeveloper. Co. Uk
Subject: [ cf-dev ] OT: please help!
Importance: High


Hi people

Sorry for the OT.

I'm tearing my hair out with this one.

Copy and paste the following into splice.asp (or whatever):

<%@LANGUAGE="JAVASCRIPT1.3"%>
<%
        Session("stest") = new Array();
        Session("stest")[0] = 0;
        Session("stest")[1] = 2;
        Session("stest")[2] = 4;
        Session("stest")[3] = 6;
        Session("stest").splice (1, 1);
        Response.Write (Session("stest"));
%>

View it, and it gives you "0,4,6" (this is good)

Now comment out the lines as follows:

<%@LANGUAGE="JAVASCRIPT1.3"%>
<%
        // Session("stest") = new Array();
        // Session("stest")[0] = 0;
        // Session("stest")[1] = 2;
        // Session("stest")[2] = 4;
        // Session("stest")[3] = 6;
        Session("stest").splice (1, 1);
        Response.Write (Session("stest"));
%>

and refresh the page in your web browser. I'd expect it to give "0,6", but
instead it gives a 500 error:
Error Type:
(0x8000FFFF)
Catastrophic failure

Why can't I splice an existing Session array variable?

HELP!

Regards

Peter Harrison
Software Engineer and Consultant
Professional Services Department
NetShift, Kennet Side, Newbury, Berkshire, RG14 5PX, UK
Tel: +44 (0) 1635 568 800       Fax: +44 (0)1635 568 850
[EMAIL PROTECTED]             www.netshift.com
Email Disclaimer - see http://www.netshift.com/disclaimer.html


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]




This email has been scanned for viruses by NetBenefit using Sophos
anti-virus technology



This email has been scanned for viruses by NetBenefit using Sophos anti-virus 
technology



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]


Reply via email to