Manuel Sterk
Manuel Sterk

Reputation: 17

Refresh page after click on button

I have a upload button but after i upload something i does not refresh the page. i thougt this would work but is doesnt:

function refreshPage(){
  window.location.reload();
} 
<span class="ff-b white ttu f21">UPLOAD<input type="button" onClick="refreshPage()"/>Close</span>

Do some body of you know how to fix this ? Kind regards.

Upvotes: 1

Views: 1129

Answers (1)

Sukhwinder Sodhi
Sukhwinder Sodhi

Reputation: 475

<form action="upload.php" method="post" enctype="multipart/form-data">
Select image to upload:
<input type="file" name="fileToUpload" id="fileToUpload">
<input type="submit" value="Upload Image" name="submit">
</form>

Upvotes: 1

Related Questions