posted 15 years ago
Hi.
I'm trying to get a String value from my Javascript form and place it in a session attribute, so I can later get it via JSP code.
I tried this: I created a hidden form field in my form called "mainForm", in my JSP page called "mainPage.jsp":
then I placed a button later on:
Btw, the form has a bunch of events which make sure that the variable called "myString" is filled up appropriately. I checked this with an alert button and myString is definitely set correctly.
I then created a function which cunningly submitted a form to the same page, which was supposed to place this string in a request parameter supposedly allowing my JSP code to grab it and place it in a session attribute:
This function reloads all the frames, and I was hoping another frame could know freely access myString and use it in its own JSP code. Unfortunately this session attribute never gets set to anything other then null.
What am I doing wrong? And is there a more elegant solution to this trivial issue?
Thanks in advance. Cheers!