sanatzzz Posted March 16, 2015 Share Posted March 16, 2015 I have multiple divisions on my page.. what happens is by having next and previous buttons on my page i can browse thru the divisions... now i have save and delete on each page, i enter some values in the textboxes of the respective divs and they get saved or deleted.. i want to refresh those textboxes after saving or deleting, as the textboxes retrieve the values from database and show as their values.. now i don't want to refresh the page as i would have to start again from the first div even i was on lets say 55th div... is there a way that the textbox values can be refresh on lets say a refresh button or the whole division gets refreshed... all i want is the textboxes to be updated to the recent value without the whole page being refreshed... any help would be welcome.. Link to comment https://forums.phpfreaks.com/topic/295273-how-to-refresh-a-div-on-button-click/ Share on other sites More sharing options...
jeffreyappel Posted March 16, 2015 Share Posted March 16, 2015 Following example may help you: <!DOCTYPE html> <html> <body> <p>Enter some text in the fields below, then press the "Reset form" button to reset the form.</p> <form id="myForm"> First name: <input type="text" name="fname"><br> Last name: <input type="text" name="lname"><br><br> <input type="button" onclick="myFunction()" value="Reset form"> </form> <script> function myFunction() { document.getElementById("myForm").reset(); } </script> </body> </html> Link to comment https://forums.phpfreaks.com/topic/295273-how-to-refresh-a-div-on-button-click/#findComment-1508201 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.