Hi theonlydrayk,
I think I was a little optimistic when I thought that I could solve this problem with AJAX, in fact I have come to the realisation now that it isn't possible to do what I want at all.
It doesn't matter how I pass the variable to the server; be it using a session or cookies, or some other method, the PHP code which I intended would access said variable, has already been run.
The PHP code which needs the session variable assignment appears later in the same .php file as the JavaScript which initiates the session variable update, and remember, no page refreshes allowed.
So, the code I wrote following your suggestion does indeed update the session variable, as required; but unfortunately, that doesn't solved my problem, as it stands at the moment.
However, I do intend to use the technique I have learnt here to pass the variable to the server; I am just going to have to rework the page that it is to be included on, so that I can use a page refresh (and bearing that in mind, it will be much simpler just to pass the value on a query string url, and forget the AJAX altogether).
Cheers,
Paul