| Programming C# C++ (7) Delphi (604) Java (8) JavaScript (55) Document (8) Events (8) Strings (3) perl (40) php (12) VBScript (1) Visual Basic (1) |
Reload a web page with a javascript function
Question: I need to force a page reload from a javascript function but document.reload() seems not to work. How do I do it?Answer: The document object is not used to reload a window, that is the reason for your problem. Below are three examples, in these cases in the onclick event.This code will reload the current window. If it is shown in a frame, then only this frame will be reloaded. If you need to reload another frame, then you may want to address it as shown in the last 2 examples.
Comments:
|