Jump to content

Recommended Posts

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

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>

 
 
This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.