jomagi Posted April 14, 2011 Share Posted April 14, 2011 Hi there! I'm working in a new site and I've a problem with refreshing content. I using CSS, HTML and little Javascript. I have 5 divs and only one appear, and the div change to another when a button is clicked, and all work fine, I travel true the five div's without problem. In each div there was a table and when the user interact with it, the user make appear hidden rows with content, that is the gold and work fine too. My problem is when I toggle to one off the others divs, and return to the first, the div appear like the user left and I want that the div look like the first time he access that div. How can I make the div to refresh to the original content view? Can you help me? Thanks to all Link to comment https://forums.phpfreaks.com/topic/233656-div-content-refresh/ Share on other sites More sharing options...
Adam Posted April 14, 2011 Share Posted April 14, 2011 JavaScript only allows you to refresh a form in whole, similar to a input type="reset", using the .reset() method on a form object. If you want to reset only portions of the form, you would be better (for a more semantic approach) using <fieldset>s instead of <div>s, and manually looping through all inputs within the <fieldset> and clearing their values. Are you using jQuery at all? jQuery makes this kind of thing a simple one-liner, where-as the pure standard JavaScript approach would be a little more complex. Link to comment https://forums.phpfreaks.com/topic/233656-div-content-refresh/#findComment-1201560 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.