Updating hidden field with javascript for posting

Hi guys,

im trying to send hidden field value's using ajax so that I dont need to refresh the page. I do have this functionality working but one of my variables requires to be updated every time that I press the "next page" link (offset +15)

I found some javascript code which apparently should be able to achieve this. The javascript variable does update (itterates +15 on link click - verified by doing an alert(document.jax.offset.value) but the hidden field value does not pass the updated value when posted.

any idea's guys? as I said all the variables do pass over but the "offset" value is always passed over as "0" even though the local javascript variables does indeed increment when the "addpage" link is clicked

thanks for the help, but unfortunately that never worked. As i was saying, all of the values pass over fine, its just that the updated value (from the addpage/backpage function) does not pass over even though the local javascript variable does indeed update.

thanks for the help, but unfortunately that never worked. As i was saying, all of the values pass over fine, its just that the updated value (from the addpage/backpage function) does not pass over even though the local javascript variable does indeed update.