
October 24th, 2012, 03:24 PM
|
|
Contributing User
|
|
Join Date: Nov 2005
Posts: 46
Time spent in forums: 10 h 41 m 8 sec
Reputation Power: 8
|
|
|
Reload javascript on IE9
Using IE9.
In the JSP page, I added <script type="text/javascript" src="test/scripts/test.js" ></script>
The file test.js contains a simple function test(){alert("loaded");} to open the alert window.
Next I created a button named Launch to call this function. When clicked the button, just as expected, the popup window opened and displayed the word: loaded. So far so good.
Then I went to the browser's URL address box on top and launched a new page, such as www.google.com. Once this page is loaded, I clicked the browser's BACK button to came back to my original page.
Once my page was loaded, I clicked the Launch button. This time, the function test(){alert("loaded");} never got executed.
When so?
(It seems that when the BACK button brought back the original page, the <script type="text/javascript" src="test/scripts/test.js" ></script> is either not execute or the test/scripts/test.js is not loaded. However the same codes worked well on Firefox).
|