TeddyKiller Posted April 14, 2010 Share Posted April 14, 2010 I couldn't explain in the subject fully. 1. There is a box, probably a div. 2. Clicking on the div, perhaps removes the div, replaces it with a textfield sort of thing. 3. Insert information, or edit whats there.. 4. Offclick of the field, and it submits, and updates the database. It's a bit like facebooks "about me" box under the display pictures. Sorry if this is hard to understand. How can I do this? Thanks Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted April 14, 2010 Share Posted April 14, 2010 Upon clicking on the div, just insert a <textarea> box and fill in the contents (if there are any). Does Facebook really update the info upon clicking away from the field? Seems a bit stupid. What if I decide to not change the contents? But for "off click", give it an onblur event and use AJAX to make a call to a PHP file that handles the update to the DB. Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 14, 2010 Author Share Posted April 14, 2010 Does Facebook really update the info upon clicking away from the field? It's kind of like.. an onclick event. The value will enver change or anything, until you click on it. (Usually means your going to change it) So.. it'll be a div with a value, onclick this and it changes into a textbox where you can edit.. I can't really explain. Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted April 14, 2010 Share Posted April 14, 2010 I know, and how you do it isn't all that hard. Just create a DIV with a textarea and hide/show when need be. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.