473,387 Members | 3,787 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Code works in Firefox doesnt work in IE

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>leftframe</title>
<style type="text/css">

.initialalgn{font-weight:bold;background-color:#315594;font-family:Arial,Helvetica,Verdana;font-size:7.90pt;color: #ffffff;width:160;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="JavaScript">
var status = 'NORMAL';
function callSetSize(incOrDec) {
// 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.visibility = "hidden";
}
else if (status == "DECREASED") {
setSize("170");
status = "NORMAL";
// Show the decrease button
dec.style.visibility = "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.visibility = "hidden";
}
else if (status == "MAXIMUM") {
setSize("170");
status = "NORMAL";
// Show the increase button
inc.style.visibility = "visible";
}
else {
alert("Thats all you can minimize!!!");
}
}
}

function setSize(colValue) {
parent.document.body.cols = colValue + ",*";
for(var i = 0; i < parent.parent.Topframe.document.images.length; i++) {
if(parent.parent.Topframe.document.images[i].name == "blank_shim") {
parent.parent.Topframe.document.images[i].width = colValue;
}
}
}

function changeCol(e){

for(i=1;i<6;i++)
{
document.getElementById('button'+i).style.backgrou ndColor="#e2e2d0";
document.getElementById('button'+i).style.color="# ee4628"
}

var el=window.event? event.srcElement: e.target
if (el.tagName=="INPUT"&&el.type=="button"){
el.style.backgroundColor="#ff6000";
el.style.color="#ffffff"
}
}

</script>
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>

<link href="../css/TemplateStyle.css" rel="stylesheet" type="text/css" >

<body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" class="leftPanel" >
<tr>
<table width = "100%" cellpadding="0" cellspacing="0" >
<tr>
<td align = "right" width="96%" rowspan="2">&nbsp; </td>
<td align = "right" width="2%" rowspan="2">&nbsp; </td>
<td align = "right" width="2%"> <a href="#" onClick="callSetSize('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="callSetSize('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="LeftPanelnav">
<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="showBranch('branch1');swapFolder('folder1 ')">
<table border=0 cellpadding=0 cellspacing=0>
<td align="left" class=smaller height=25>
<input type="button" id="button1" value="Manage page" class="initialalgn" >
</td>
</table>
</div>

<span class="branch" id="branch1">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td class="td" height=20>
<a href="clientgrid.html" target="MiddleFrame" ><input type="button" id="button2" value="Client Grid" class="initialalgn"></a></td>
</tr>

<tr>
<td class="td" height=20>
<a href="devicegrid.html" target="MiddleFrame"><input type="button" id="button3" value="Device Grid(Zone Definition)" class="initialalgn" ></a>
</td>
</tr>

</table>
</span>
</td>
</tr>



<tr>
<td>
<div class="trigger" onClick="showBranch('branch2');swapFolder('folder2 ')">
<table border=0 cellpadding=0 cellspacing=0>
<td class="smaller" height=25>
<input type="button" id="button4" value="Manage Environment" class="initialalgn" >
</td>
</table>
</div>

<span class="branch" id="branch2">
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td class="td" height="20">
<a href="class.html" target="MiddleFrame"><input type="button" id="button5" value="Class" class="initialalgn" ></a>
</td>
</tr>
</table>
</span>
</td>
</tr>

</table>
</td>
</tr>



<script>
function swapFolder(img)
{
objImg = document.getElementById(img);
}

function showBranch(branch)
{
var objBranch = document.getElementById(branch).style;

if(objBranch.display=="block")
{
objBranch.display="none";
}
else
{
document.getElementById('branch1').style.display=" none";
document.getElementById('branch2').style.display=" none";

objBranch.display="block";
}

}
</script>
</body>
</html>[/html]
Mar 9 '08 #1
1 2667
nomad
664 Expert 512MB
My two cents...
I would tend to avoid frames. Use templates instead.
If you have say 100 pages can you imagine change all the frames?
With a template you just make on change and the whole site is updated.


nomad
Mar 10 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: lkrubner | last post by:
We are working on a website that is here: http://www.lauradenyes.com/ The site was working till I put up an .htaccess file that was suppose to redirect all html files to the PHP parser. The...
17
by: tshad | last post by:
Many (if not most) have said that code-behind is best if working in teams - which does seem logical. How do you deal with the flow of the work? I have someone who is good at designing, but...
4
by: stevong | last post by:
It works on Konquerer though. I remember it works on IE too. I've tried window.close() too. Doesn't work on Firefox also. I've also tried to create a function. It doesnt work on Firefox also....
4
by: puja | last post by:
hi all, I have an asp.net website where am including .css file dynamically on page load event. For diff users, there is diff CSS file. So after user logs in, I am setting CSS href on page load....
0
by: jmacduff | last post by:
Big question: How to enable edit/update commands to work when setting the sqldatasource select command from code behind. Details: I have a GridView using a sqldatasouce with the select and...
1
by: reemamg | last post by:
Have a piece of code which works in Firefox however doesnt work in IE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <meta...
3
by: SpaceMarine | last post by:
sorry for the near-dupe post (also in .security), but im desperately trying to find an answer to this... i am attempting to configure security for an intranet web application in ASP.NET 2. it...
1
by: bogdanm | last post by:
Hello everyone, I am having a probleme with a issuu code when trying to insert it o my site it doesnt work in IE but in mozzila works fine the code is bellow: <div><object...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.