I have a simple table with different weather maps like (satellite, temperature, pressure) on right side of table and time interval links at the bottom of the table. What I want to do is load a link with correct map picture once right side is pressed and here is my problem: set variable. Variable which tells which map is currently selected and now if user presses link with time interval at the bottom of the table let say 24, 48 or 72 hours that links looks at which map is selected (variable) and then loads correct map with picture of time chosen into the iframe. I played with Javascript and PHP but don’t know how to set that variable. I presume once variable is set I can use nested ifs to see which picture to load. Here is my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT type=text/javascript>
var iframeids=["myframe"]
var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers
function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}
</script>
<?php
//create some variables:
$url = "48";
?>
</head>
<body>
<table width="81%" height="129" border="1">
<tr>
<td width="88%"><table width="101%" height="104" border="1">
<tr>
<td><iframe id="myframe2" src="" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" ; width=800; height=200; display:yes"></iframe>
</td>
</tr>
</table>
<table width="101%" border="1">
<tr>
<td><a href="javascript:loadintoIframe('myframe2', 'http://131.54.120.150/gifImages/21OWS_EUROPE_FITL_PROG-BRIEFING_<? $url?>.gif')">present</a></td>
<td>24 hours</td>
<td>48hours</td>
<td>72hours</td>
<td>120hours</td>
</tr>
</table>
</td>
<td width="12%"><table width="100%" height="130" border="1">
<tr>
<td><div align="center"> <a href="javascript:loadintoIframe('myframe2', 'http://131.54.120.150/gifImages/21OWS_EUROPE_FITL_PROG-BRIEFING_24.gif" onclick="<?php $url="48" ?>">Satelite </a></div></td>
</tr>
<tr>
<td><div align="center"><a href="gg">temperature</a> </div></td>
</tr>
</table></td>
</tr> <tr>
</tr></table>
<p> variable = <? echo $url ?> </p>
</body>
</html>