• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

remember me check box not working

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
We can fix it! We just need some baling wire, some WD-40, a bit of duct tape and this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic