I've two frames in a page. On the left Frame i've buttons , if we click on button the particular pages will be loaded in the middle Frame.
This code works perfectly in Firefox but not in IE ...
Please help me to resolve this issue..
[html]
<html>
<head>
<!-- Infrastructure code for the tree -->
<title>leftfram e</title>
<style type="text/css">
.initialalgn{fo nt-weight:bold;bac kground-color:#315594;f ont-family:Arial,He lvetica,Verdana ;font-size:7.90pt;col or: #ffffff;width:1 60;text-align:left}
body{
font: 10pt Verdana,sans-serif;
color: navy;
}
.trigger{
cursor: auto;
cursor: auto;
}
.branch{
display: none;
margin-left: 12px;
}
img
{
border-style: none;
}
</style>
<script language="JavaS cript">
var status = 'NORMAL';
function callSetSize(inc OrDec) {
// Check if the user wants to increase the width of the Frameset
if(incOrDec == "INCREASE") {
if(status == "NORMAL") {
setSize("320");
status = "MAXIMUM";
// Hide the increase button
inc.style.visib ility = "hidden";
}
else if (status == "DECREASED" ) {
setSize("170");
status = "NORMAL";
// Show the decrease button
dec.style.visib ility = "visible";
}
else {
alert("Thats all you can maximise!!!");
}
}
// Check if the user wants to decrease the width of the Frameset
if(incOrDec == "DECREASE") {
if(status == "NORMAL") {
setSize("57");
status = "DECREASED" ;
// Hide the decrease button
dec.style.visib ility = "hidden";
}
else if (status == "MAXIMUM") {
setSize("170");
status = "NORMAL";
// Show the increase button
inc.style.visib ility = "visible";
}
else {
alert("Thats all you can minimize!!!");
}
}
}
function setSize(colValu e) {
parent.document .body.cols = colValue + ",*";
for(var i = 0; i < parent.parent.T opframe.documen t.images.length ; i++) {
if(parent.paren t.Topframe.docu ment.images[i].name == "blank_shim ") {
parent.parent.T opframe.documen t.images[i].width = colValue;
}
}
}
function changeCol(e){
for(i=1;i<6;i++ )
{
document.getEle mentById('butto n'+i).style.bac kgroundColor="# e2e2d0";
document.getEle mentById('butto n'+i).style.col or="#ee4628"
}
var el=window.event ? event.srcElemen t: e.target
if (el.tagName=="I NPUT"&&el.type= ="button"){
el.style.backgr oundColor="#ff6 000";
el.style.color= "#ffffff"
}
}
</script>
<script language="JavaS cript">
<!--
function MM_reloadPage(i nit) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Net scape")&&(parse Int(appVersion) ==4)) {
document.MM_pgW =innerWidth; document.MM_pgH =innerHeight; onresize=MM_rel oadPage; }}
else if (innerWidth!=do cument.MM_pgW || innerHeight!=do cument.MM_pgH) location.reload ();
}
MM_reloadPage(t rue);
// -->
</script>
</head>
<link href="../css/TemplateStyle.c ss" rel="stylesheet " type="text/css" >
<body marginheight="0 " marginwidth="0" topmargin="0" leftmargin="0" class="leftPane l" >
<tr>
<table width = "100%" cellpadding="0" cellspacing="0" >
<tr>
<td align = "right" width="96%" rowspan="2">&nb sp; </td>
<td align = "right" width="2%" rowspan="2">&nb sp; </td>
<td align = "right" width="2%"> <a href="#" onClick="callSe tSize('DECREASE ');" name = "dec" id = "dec" >
<img src="../images/resize1.gif" width="12" height="12" border="0" alt="Expanded Configuration Window"></a>
</td>
</tr>
<tr>
<td align = "right" width="2%" valign="top"><a href="#" onClick="callSe tSize('INCREASE ');" name = "inc" id = "inc" >
<img src="../images/resize2.gif" width="12" height="12" border="0" alt="Expanded Navigation Window"></a></td>
</tr>
</table>
</tr>
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="LeftPane lnav">
<tr>
<td valign="top">
</td>
</tr>
</table>
<!-- Execution of the code that actually builds the specific tree -->
<table align="left" width = "100%" cellpadding="0" cellspacing="0" >
<tr>
<td align="left">
<div class="trigger" onClick="showBr anch('branch1') ;swapFolder('fo lder1')">
<table border=0 cellpadding=0 cellspacing=0>
<td align="left" class=smaller height=25>
<input type="button" id="button1" value="Manage page" class="initiala lgn" >
</td>
</table>
</div>
<span class="branch" id="branch1">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td class="td" height=20>
<a href="clientgri d.html" target="MiddleF rame" ><input type="button" id="button2" value="Client Grid" class="initiala lgn"></a></td>
</tr>
<tr>
<td class="td" height=20>
<a href="devicegri d.html" target="MiddleF rame"><input type="button" id="button3" value="Device Grid(Zone Definition)" class="initiala lgn" ></a>
</td>
</tr>
</table>
</span>
</td>
</tr>
<tr>
<td>
<div class="trigger" onClick="showBr anch('branch2') ;swapFolder('fo lder2')">
<table border=0 cellpadding=0 cellspacing=0>
<td class="smaller" height=25>
<input type="button" id="button4" value="Manage Environment" class="initiala lgn" >
</td>
</table>
</div>
<span class="branch" id="branch2">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td class="td" height="20">
<a href="class.htm l" target="MiddleF rame"><input type="button" id="button5" value="Class" class="initiala lgn" ></a>
</td>
</tr>
</table>
</span>
</td>
</tr>
</table>
</td>
</tr>
<script>
function swapFolder(img)
{
objImg = document.getEle mentById(img);
}
function showBranch(bran ch)
{
var objBranch = document.getEle mentById(branch ).style;
if(objBranch.di splay=="block")
{
objBranch.displ ay="none";
}
else
{
document.getEle mentById('branc h1').style.disp lay="none";
document.getEle mentById('branc h2').style.disp lay="none";
objBranch.displ ay="block";
}
}
</script>
</body>
</html>[/html]
This code works perfectly in Firefox but not in IE ...
Please help me to resolve this issue..
[html]
<html>
<head>
<!-- Infrastructure code for the tree -->
<title>leftfram e</title>
<style type="text/css">
.initialalgn{fo nt-weight:bold;bac kground-color:#315594;f ont-family:Arial,He lvetica,Verdana ;font-size:7.90pt;col or: #ffffff;width:1 60;text-align:left}
body{
font: 10pt Verdana,sans-serif;
color: navy;
}
.trigger{
cursor: auto;
cursor: auto;
}
.branch{
display: none;
margin-left: 12px;
}
img
{
border-style: none;
}
</style>
<script language="JavaS cript">
var status = 'NORMAL';
function callSetSize(inc OrDec) {
// Check if the user wants to increase the width of the Frameset
if(incOrDec == "INCREASE") {
if(status == "NORMAL") {
setSize("320");
status = "MAXIMUM";
// Hide the increase button
inc.style.visib ility = "hidden";
}
else if (status == "DECREASED" ) {
setSize("170");
status = "NORMAL";
// Show the decrease button
dec.style.visib ility = "visible";
}
else {
alert("Thats all you can maximise!!!");
}
}
// Check if the user wants to decrease the width of the Frameset
if(incOrDec == "DECREASE") {
if(status == "NORMAL") {
setSize("57");
status = "DECREASED" ;
// Hide the decrease button
dec.style.visib ility = "hidden";
}
else if (status == "MAXIMUM") {
setSize("170");
status = "NORMAL";
// Show the increase button
inc.style.visib ility = "visible";
}
else {
alert("Thats all you can minimize!!!");
}
}
}
function setSize(colValu e) {
parent.document .body.cols = colValue + ",*";
for(var i = 0; i < parent.parent.T opframe.documen t.images.length ; i++) {
if(parent.paren t.Topframe.docu ment.images[i].name == "blank_shim ") {
parent.parent.T opframe.documen t.images[i].width = colValue;
}
}
}
function changeCol(e){
for(i=1;i<6;i++ )
{
document.getEle mentById('butto n'+i).style.bac kgroundColor="# e2e2d0";
document.getEle mentById('butto n'+i).style.col or="#ee4628"
}
var el=window.event ? event.srcElemen t: e.target
if (el.tagName=="I NPUT"&&el.type= ="button"){
el.style.backgr oundColor="#ff6 000";
el.style.color= "#ffffff"
}
}
</script>
<script language="JavaS cript">
<!--
function MM_reloadPage(i nit) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Net scape")&&(parse Int(appVersion) ==4)) {
document.MM_pgW =innerWidth; document.MM_pgH =innerHeight; onresize=MM_rel oadPage; }}
else if (innerWidth!=do cument.MM_pgW || innerHeight!=do cument.MM_pgH) location.reload ();
}
MM_reloadPage(t rue);
// -->
</script>
</head>
<link href="../css/TemplateStyle.c ss" rel="stylesheet " type="text/css" >
<body marginheight="0 " marginwidth="0" topmargin="0" leftmargin="0" class="leftPane l" >
<tr>
<table width = "100%" cellpadding="0" cellspacing="0" >
<tr>
<td align = "right" width="96%" rowspan="2">&nb sp; </td>
<td align = "right" width="2%" rowspan="2">&nb sp; </td>
<td align = "right" width="2%"> <a href="#" onClick="callSe tSize('DECREASE ');" name = "dec" id = "dec" >
<img src="../images/resize1.gif" width="12" height="12" border="0" alt="Expanded Configuration Window"></a>
</td>
</tr>
<tr>
<td align = "right" width="2%" valign="top"><a href="#" onClick="callSe tSize('INCREASE ');" name = "inc" id = "inc" >
<img src="../images/resize2.gif" width="12" height="12" border="0" alt="Expanded Navigation Window"></a></td>
</tr>
</table>
</tr>
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="LeftPane lnav">
<tr>
<td valign="top">
</td>
</tr>
</table>
<!-- Execution of the code that actually builds the specific tree -->
<table align="left" width = "100%" cellpadding="0" cellspacing="0" >
<tr>
<td align="left">
<div class="trigger" onClick="showBr anch('branch1') ;swapFolder('fo lder1')">
<table border=0 cellpadding=0 cellspacing=0>
<td align="left" class=smaller height=25>
<input type="button" id="button1" value="Manage page" class="initiala lgn" >
</td>
</table>
</div>
<span class="branch" id="branch1">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td class="td" height=20>
<a href="clientgri d.html" target="MiddleF rame" ><input type="button" id="button2" value="Client Grid" class="initiala lgn"></a></td>
</tr>
<tr>
<td class="td" height=20>
<a href="devicegri d.html" target="MiddleF rame"><input type="button" id="button3" value="Device Grid(Zone Definition)" class="initiala lgn" ></a>
</td>
</tr>
</table>
</span>
</td>
</tr>
<tr>
<td>
<div class="trigger" onClick="showBr anch('branch2') ;swapFolder('fo lder2')">
<table border=0 cellpadding=0 cellspacing=0>
<td class="smaller" height=25>
<input type="button" id="button4" value="Manage Environment" class="initiala lgn" >
</td>
</table>
</div>
<span class="branch" id="branch2">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td class="td" height="20">
<a href="class.htm l" target="MiddleF rame"><input type="button" id="button5" value="Class" class="initiala lgn" ></a>
</td>
</tr>
</table>
</span>
</td>
</tr>
</table>
</td>
</tr>
<script>
function swapFolder(img)
{
objImg = document.getEle mentById(img);
}
function showBranch(bran ch)
{
var objBranch = document.getEle mentById(branch ).style;
if(objBranch.di splay=="block")
{
objBranch.displ ay="none";
}
else
{
document.getEle mentById('branc h1').style.disp lay="none";
document.getEle mentById('branc h2').style.disp lay="none";
objBranch.displ ay="block";
}
}
</script>
</body>
</html>[/html]
Comment