PDA

View Full Version : Variable problem


pixelvoodoo
11-30-2005, 04:04 PM
I'm having a nightmare with a simple variable I have which I need to increase everytime I refresh the page to load a new sample of xml into my page.

I have a variable named "pageno" for example, which when I hit the next button I have the code...

pageno = pageno+1;

but say I'm on page 1 and I hit the button, it returns the value 12 not 2???

minusing numbers from the variable works fine, but adding doesn't want to add 1 to what ever the current value is, but bolt the two numbers together??

any ideas?

Thanks very much!

Cota
11-30-2005, 04:07 PM
something like
pageno = Number(pageno)+1;

Xeef
11-30-2005, 04:07 PM
try :
pageno = Number(pageno)+1;

pixelvoodoo
12-01-2005, 06:39 AM
wicked, cheers!