Hi All,
I have just taken on maintenance of an app developed in ASP with JavaScript
as the language.
I am struggling with carrying out some math on a value derived from the
querystring:
if (Request.QueryS tring != "") {
nPage = Request.QuerySt ring("Page");
} else {
nPage = 1;
}
How do I program this so that nPage is an integer, rather than a string when
it comes from the querystring? I have tried this:
....
nPage = cInt(Request.Qu eryString("Page "));
....
This results in the following error:
Microsoft JScript runtime error '800a138f'
Object expected
If I don't do this, when I use the variable nPage later on (To add it to
another number) I get NaN error. (Not a number - E.g Trying to add a string
to a number)
Any help will be much appreciated.
Thank you.
Simon.
--
--
* Please reply to group for the benefit of all
* Found the answer to your own question? Post it!
* Get a useful reply to one of your posts?...post an answer to another one
* Search first, post later : http://www.google.co.uk/groups
* Want my email address? Ask me in a post...Cos2Much SpamMakesUFat!