Setting and Getting Session State Variables in Apex using Javascript
788574Aug 9 2010 — edited Aug 9 2010Dear Friends:
I have the following task to be completed as soon as possible.
I have many report parameter forms linked on one major report form. (all of the report parameter forms are included in a list, that is a regular list no submit buttons or anything). When a user clicks on any parameter form it will a while to load that particular form, because there were so many background manipulations going on. Thats why my boss asked to build a small clock on each page and show how long does it take to navigate from one form to another form.
1.) In fact I build a very nice clock using JQuery. In side that clock code I start the clock when a user clicks on an anchor text <a>. That functionality is working well.
2.) Now I used Ajax/Javascript (htmldb_Get) to set the session time variables in the session state (hour, minute, second, and millisecond).
3.) When I click on a link and when I moved to the next page, initially the session variables were not populated in the clock fields, but when I refresh the whole form the session variables were populated well. I think before the first form's session variables got stored in the server the second form start loading. That's why I didn't get the values in the second page at the begining
4.) Therefore I thought in the second page if I write a function in javascript to access the session variables will solve the issue. But the problem is I couldn't find any way to get the session state variables using Javascript.
Can somebody tell me that how is possible to access a session state variable using Javascript. If there is no way then could you please tell me how may I access first form's session variable from the second form without refreshing (in fact I tried &variableName. ).
Thanks a lot,
Jey