-3

how to refresh a page after submitting form in word press. first i tried location.reload(); and much more example which i got from search engines but nothing worked. i tries to take the text field by id that too didn't worked. below is the code which i tried. can any one help me??

--> Name E-mail Phone No Address Subject Message Enter the Code here For information related to our Parish Contacts: Click here

--> //

window.history.forward(1); function noBack() { window.history.forward(); } -->

Anju
  • 9
  • 1
  • 1
  • 5
  • [There's an easily locatable JavaScript method for closing a window](https://www.google.com.au/search?q=javascript+close+window). I'm downvoting this for a lack of research effort. – doppelgreener Apr 24 '13 at 05:50
  • AM new to javascript. so trying to do with html – Anju Apr 24 '13 at 10:12
  • HTML's a markup language. It defines information, not behaviour. You can't do this with HTML. JavaScript exists to define behaviour, so that's what you should be using. – doppelgreener Apr 24 '13 at 10:27

2 Answers2

1
<a href="" OnClick="window.close()">Close Window</a> 

If you want to close it after a certain time...

add onLoad="setTimeout('window.close()', 5000);

HemChe
  • 2,249
  • 1
  • 21
  • 33
1

Did you try JavaScript? How to close current tab in a browser window?

<a href="blablabla" onclick="setTimeout(function(){var ww = window.open(window.location, '_self'); ww.close(); }, 1000);">
    If you click on this the window will be closed after 1000ms
</a>

or perhaps jQuery too? How to capture the browser window close event?

Community
  • 1
  • 1
compliance
  • 365
  • 7
  • 23
  • Hi tried this but still not working. Now am trying to use mouseover and mouseout function in the dialog box. can you help me in this? Thanks – Anju Apr 25 '13 at 09:14