Jump to content
Sign in to follow this  
leso9903

Keep a property after page is loaded

Recommended Posts

Hello,

first off I wanted to thank you guys for helping me this far. I've posted a couple of times here and I got my questions answered and my problems fixed. I hope I can return the favour when I'm abit more knowledgable.

 

Anyway, I'm working on a registration form and I've implemented some animation effects such as the input field turning red on click when there is no data inserted. I'd like to know how to keep the red input field even after the page has loaded. I've noticed that the inserted data inside the input fields are still there after I've updated the page - I'd like the same for my input field color. I've heard that it has something to do with a global variable and some false/true statements. All of this is done i jquery and I'd like to keep doing it in jquery. Also, please comment on the theory in question if there is a solution to this problem. I've a much easier time to remember stuff when there is some info about it..

 

thanks in advance!

 

/Len

Share this post


Link to post
Share on other sites

Please post the relevant part of what you have so far.

Share this post


Link to post
Share on other sites

Normally the content of a form would be preserved for reloading by the server code, if that is desired. If additional information needs to be preserved you might need to add hidden form fields for that purpose. In this case it isn't clear what you want to do. What is the action field on the form?

Share this post


Link to post
Share on other sites

 

 

I've noticed that the inserted data inside the input fields are still there after I've updated the page

 

How are you updating the page? Are you sure this is a javascript question and not a server-side question? Are you using AJAX or a traditional form submission?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...