GeeCON Prague 2014*
The moose likes JSP and the fly likes remember me check box not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "remember me check box not working" Watch "remember me check box not working" New topic
Author

remember me check box not working

Shubha Krishna
Greenhorn

Joined: Aug 18, 2006
Posts: 13
Hi Everybody!

I am trying to put a 'Rememeber me'check box in logon page and based on the value of check box I am setting the cookie in the next page. But while doing this I am checking whether the check box checked true or not in the function of checkbox which is called on onChange event. If it is true I am assigning 'yes' value in a hidden field and passing it to another page else I am assigning 'No' value to hidden field. In my case if it's true it's taking yes but if it's not true then it's not taking 'No'. So it's failing there. I tried putting else if too but still it's not working. Please provide a soution to this.

I have tried to get that hidden field value in the next page by using request.getParameter(), getRequestParameter(). These didnt work. So I tried with session variable too. But if I used the session varaible inside the function of checkbox which is called on onChange event. But if I am doing so it's always taking yes value even if I closed that session. Please suggest. Thanks in advance.
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

So it's failing there. I tried putting else if too but still it's not working. Please provide a soution to this.


did you mean javascript is not assigning the value in hidden field?

I have tried to get that hidden field value in the next page by using request.getParameter(), getRequestParameter(). These didnt work.




mean you have to provide hidden field name in the argument of getParameter Method in order to get the value.

try this code in your next page where you passing the request.

your hidden field name = "myhiddenfield"



make sure you hidden field is under the form tag.

hope it helps.


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: remember me check box not working