Code:
var previous_obj = null;
var previous_url = null;
function loadPage(cur_obj,url){
previous_obj.onclick = function(){loadPage(this,previous_url);}
previous_obj.className = "header_inactivated";
cur_obj.className = "header_activated";
cur_obj.onclick = function(){};
previous_obj = cur_obj;
previous_url = url;
window.frames['main_frame'].location.href = url;
}
function set(){
previous_obj = document.getElementById("own_alerts");
previous_url = 'own_alerts.html';
previous_obj.onclick = function(){}
document.getElementById('main_frame').style.width = (screen.width-30)+"px";
window.frames['main_frame'].location.href = 'own_alerts.html';
}
Code:
<body onload="set()">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="header_activated" onclick="loadPage(this,'own_alerts.html')" id="own_alerts"
title="List of alerts sent by you">Alerts sent by you</td>
<td class="header_inactivated" onclick="loadPage(this,'others_alerts.html')" id="others_alerts"
title="List of alerts recieved by you">Alerts recieved by you</td>
<td style="border-bottom-style:solid;border-bottom-color:#000000;border-bottom-width:2px">
</td>
</tr>
<tr>
<td colspan="3" class="full" style="height:7px;background-color:#BBBBBB"></td>
</tr>
<tr>
<td colspan="3" class="full" style="height:700px">
<iframe src="" frameborder="0" height="690px"
name="main_frame" scrolling="auto" id="main_frame"></iframe>
</td>
</tr>
</table>
</body>
</html>
Comment