I am having the most ridiculous problems getting the split method to do what I want. All I am trying to do is split a string using the carat (^) as a delimiter. Here is the code for two simple pages: an htm file and the asp file that it posts to. I know the answer must be simple, but I am apparently looking through it at this point.
test1.htm
test2.asp
Every time I run this, I can see the correct contents of strStateCodeList (from the Response.Write command) and then I receive the following error:
Any help with this would be appreciated!
Valerie
test1.htm
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Test Page 1</title>
</head>
<body>
<form name=frmTest action="test2.asp" method="POST">
<input type="hidden" name="hidStateCodeList" value="NY^PA">
<input type="submit" name="btnTry" value="Push this button">
</form>
</body>
</html>
test2.asp
Code:
<%@ language = JavaScript %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Test2</title>
</head>
<body>
<%
var strStateCodeList = Request.Form("hidStateCodeList");
Response.Write(strStateCodeList);
var arChoices = strStateCodeList.split('^');
//Response.Write(arChoices[0]);
%>
</body>
</html>
Every time I run this, I can see the correct contents of strStateCodeList (from the Response.Write command) and then I receive the following error:
Code:
Microsoft JScript runtime error '800a01b6'
Object doesn't support this property or method
/PS/test2.asp, line 14
Any help with this would be appreciated!
Valerie