Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi to all

it's urgent

see i add 2 button on my form.

if i click first name then this button should hide and show corresponding div.

so far i made code. when i click button the button div set to none. and on click it show respective div.

but the problem in refresh. when i click f5 the button div is displaying

Please help
Posted
Updated 13-Apr-12 0:06am
v2

1 solution

hi ,
As we know that HTTP is sate less protocol, It might be the case when page load you are showing the div tag.

when you hide tag using button and refresh the page HTML dose not remember that div is hide

you should take help of cookie to do this ,you can store your last status of div(showing/hiding) in cookie and at the time of page loading read the cookie value and set the display property of div accordingly
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900