I'm using javascript to grab the page url and cut it up so that
variables can be passed- eg images.html?img =23 returns an argument
args[arg] what I can use to display an image from an array.
The problem only comes when I want to perform an action on the
variable.
I can say:
thispage = args[arg]
//This returns the value of the current page.
previouspage = (thispage -1)
//This works ok- it's the page number minus one.
nextpage = (thispage +1)
//This doesn't work. It returns the pagenumber with a 1 appended on
the end. ie if the page was 23 I would get 231.
I've tried -- and ++ aswell, but I can't get the result I want.
How do I do this?
variables can be passed- eg images.html?img =23 returns an argument
args[arg] what I can use to display an image from an array.
The problem only comes when I want to perform an action on the
variable.
I can say:
thispage = args[arg]
//This returns the value of the current page.
previouspage = (thispage -1)
//This works ok- it's the page number minus one.
nextpage = (thispage +1)
//This doesn't work. It returns the pagenumber with a 1 appended on
the end. ie if the page was 23 I would get 231.
I've tried -- and ++ aswell, but I can't get the result I want.
How do I do this?
Comment