5,838
edits
m (→Introduction: now mentions that other examples elsewhere in Wiki) |
m (→Script Example: Moved note from above to between preformatted code areas for increased clarity) |
||
|
If you want to copy this code, note the 'target' attribute in the 'a' (anchor) element refers to the 'name' attribute in the 'iframe' element.
===Script Example===
NOTE: In this version, a query string is used containing the time. A query string is something that starts with a question mark and follows a Universal Resource Locator (URL). The URL tells the browser where to find the (image) file it is being asked to load. The query string, in this case, tells the browser to load a fresh copy of the (image) file from its source because it will not match the query string on the file contained in a browser cache (if the browser options/preferences are set to allow cache copies to be used when the same file is requested again).▼
<pre>
<script type="text/javascript">
function changeImage(im) {document.images["graphs"].src = im + "?" + new Date().getTime();}
</script></pre>
▲NOTE: In this version, a query string is used containing the time. A query string is something that starts with a question mark and follows a Universal Resource Locator (URL). The URL tells the browser where to find the (image) file it is being asked to load. The query string, in this case, tells the browser to load a fresh copy of the (image) file from its source because it will not match the query string on the file contained in a browser cache (if the browser options/preferences are set to allow cache copies to be used when the same file is requested again).
<pre><p> <img src="images/wind.png" name="graphs" id="graphs" title="Weather Graphs" alt="Weather Graphs"/></p>
<table cellpadding="0" cellspacing="0" id="Graph_menu">
| |||
edits