473,323 Members | 1,570 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,323 software developers and data experts.

I've Lost My Buttons - Can Anyone Help Me Find Them?


Hi Experts,

I'm new to JavaScript and web-based apps development, so I'll tell you right off
that I don't really know my way around it as of yet.

I'm trying to create a code library set with JavaScript (in DreamweaverMX)
to display "buttons" with which to select pages in a gallery. I'm trying to
"grey out" (and disable) the button for the current page when it is displayed.
(This isn't rocket science here, but it's something that I think SHOULD work
- and if I can't get something as simple as this to work, then I won't get
the more complex stuff to work either.)

When I try to open it with IE6, there are no buttons - nothing - it's like the
JavaScript is being ignored.

Can anyone clue me in as to what my problem is?
THANKS!
This is the code for index.htm:
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Button Function with JavaScript</title>
<style type="text/css">
<!--
h1,h2,h3,h4,h5,h6 {font-family: Times New Roman, Times, serif;}
-->
</style>
<link href="StyleSheets/Table%20Cell%20Style%20Sheet.css" rel="stylesheet"
type="text/css">
<link href="StyleSheets/Primary%20Style%20Sheet.css" rel="stylesheet" type="text/css">
<link href="StyleSheets/Page%20Ref%20Style%20sheet.css" rel="stylesheet"
type="text/css">

<script language="JavaScript" type="text/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);

// THIS is where the page number is set for button reference.

if (typeof session.syspkg == "undefined")
{ var sysp = new object ();
sysp.top_page_ref = 1;
session.syspkg = sysp;
}

//-->
</script>

<style type="text/css">
<!--
a:link {color: #FFFFFF;}
a:visited {color: #CCCC00;}
a:active {color: #FF0000;}
-->
</style></head>

<body>
<h1 class="style2h1">Page Heading</h1>
<div id="PageTagLayer" style="position:absolute; left:680px; top:14px; width:291px;
height:70px; z-index:1">
<!--
************************************************** ************************************************** *
-->
<script language="JavaScript" type="text/JavaScript">
<!--
document.write
("<div id=\"PageCellLayer01\" style=\"position:absolute; left:8px; top:0px;
width:60px; height:17px; z-index:2\" ");

if (session.syspkg.top_page_ref != 1)
document.write ("class=\"PageRefCell02\"><a href=\"index.htm\">Page
1</a></div>");
else document.write ("class=\"PageRefCell02Off\">Page 1</div>");

document.write
("<div id=\"PageCellLayer02\" style=\"position:absolute; left:76px; top:0px;
width:60px; height:17px; z-index:2\" ");

if (session.syspkg.top_page_ref != 2)
document.write ("class=\"PageRefCell02\"><a href=\"Page02.htm\">Page
2</a></div>");
else document.write ("class=\"PageRefCell02Off\">Page 2</div>");

document.write
("<div id=\"PageCellLayer03\" style=\"position:absolute; left:76px; top:24px;
width:60px; height:17px; z-index:2\" ");

//-->
</script>
<!--
************************************************** ************************************************** *
-->
</div>
<table width="980" height="446" border="0" align="center" cellpadding="2"
cellspacing="2">
<tr>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
</tr>
<tr>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
</tr>
</table>
</body>
</html>
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
This is the code for Page02.htm:
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Button Function with JavaScript</title>
<style type="text/css">
<!--
h1,h2,h3,h4,h5,h6 {font-family: Times New Roman, Times, serif;}
-->
</style>

<link href="StyleSheets/Table%20Cell%20Style%20Sheet.css" rel="stylesheet"
type="text/css">
<link href="StyleSheets/Primary%20Style%20Sheet.css" rel="stylesheet" type="text/css">
<link href="StyleSheets/Page%20Ref%20Style%20sheet.css" rel="stylesheet"
type="text/css">
<script language="JavaScript" type="text/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);

session.syspkg.top_page_ref = 2;

//-->
</script>

<style type="text/css">
<!--
a:link {color: #FFFFFF;}
a:visited {color: #CCCC00;}
a:active {color: #FF0000;}
-->
</style></head>
<body>
<h1 class="style2h1">Page Heading</h1>

<div id="PageTagLayer" style="position:absolute; left:680px; top:14px; width:291px;
height:70px; z-index:1">
<!--
************************************************** ************************************************** *
-->
<script language="JavaScript" type="text/JavaScript">
<!--
document.write
("<div id=\"PageCellLayer01\" style=\"position:absolute; left:8px; top:0px;
width:60px; height:17px; z-index:2\" ");

if (session.syspkg.top_page_ref != 1)
document.write ("class=\"PageRefCell02\"><a href=\"index.htm\">Page
1</a></div>");
else document.write ("class=\"PageRefCell02Off\">Page 1</div>");

document.write
("<div id=\"PageCellLayer02\" style=\"position:absolute; left:76px; top:0px;
width:60px; height:17px; z-index:2\" ");

if (session.syspkg.top_page_ref != 2)
document.write ("class=\"PageRefCell02\"><a href=\"Page02.htm\">Page
2</a></div>");
else document.write ("class=\"PageRefCell02Off\">Page 2</div>");

document.write
("<div id=\"PageCellLayer03\" style=\"position:absolute; left:76px; top:24px;
width:60px; height:17px; z-index:2\" ");

//-->
</script>
<!--
************************************************** ************************************************** *
-->
</div>

<table width="980" height="446" border="0" align="center" cellpadding="2"
cellspacing="2">
<tr>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
</tr>
<tr>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
<td width="238"><table width="208" height="244" border="0" align="center"
cellpadding="2" cellspacing="4">
<tr> <td width="144" height="200" class="CellTable01">&nbsp;</td> </tr>
<tr> <td height="32" class="CellTable01">Title</td> </tr>
</table></td>
</tr>
</table>
</body>
</html>
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
This is the code for Page Ref Style sheet.css
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
..PageRefCell02 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 14px;
font-style: oblique;
line-height: 16px;
background-color: #660000;
color: #FFFFFF;
text-align: center;
text-indent: 1px;
margin: 0px;
padding: 0px;
width: auto;
border: thin groove #808030;
}
..PageRefCell02Off {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 14px;
font-style: oblique;
line-height: 16px;
background-color: #999999;
color: #FFFFFF;
text-align: center;
text-indent: 1px;
margin: 0px;
padding: 0px;
width: auto;
border: thin groove #808030;
background-image: url(../Images/hash02.jpg);
}
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
This is the code for Primary Style Sheet.css
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
body {}
h1 {
color: #000000;
height: auto;
width: auto;
border: thick groove #000000;
background-color: #FFFFFF;
padding-right: 1px;
padding-left: 1px;
margin-right: 222px;
margin-left: 222px;
top: auto;
letter-spacing: normal;
text-align: center;
word-spacing: normal;
padding-top: 1px;
padding-bottom: 1px;
}
h1,h2,h3,h4,h5,h6 {
font-family: Times New Roman, Times, serif;
}

..style2h1 {
height: auto;
width: auto;
font-style: italic;
font-size: 44px;
font-family: Georgia, "Times New Roman", Times, serif;
font-weight: 100;
color: #000000;
line-height: 48px;
padding-top: 2px;
padding-right: 4px;
padding-bottom: 2px;
padding-left: 4px;
margin-top: 1px;
margin-right: 333px;
margin-bottom: 8px;
margin-left: 333px;
border: thick ridge #FFFFFF;
}
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
This is the code for Table Cell Style Sheet.css
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
..CellTable01 {
margin: 1px;
padding: 1px;
color: #660000;
font-size: 18px;
text-decoration: none;
font-style: oblique;
font-family: "Times New Roman", Times, serif;
font-weight: 600;
text-align: center;
border: medium ridge #660000;
background-color: #808030;
}
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Jul 23 '05 #1
1 1692
On Mon, 15 Nov 2004 11:24:07 -0600, Anna K. <annak98[at]yahoo[dot]com> wrote:

Hi Experts,

Never mind - problem solved.

IE6 doesn't recognize the "session" identifier:
if (typeof session.syspkg == "undefined")
{ var sysp = new object ();
sysp.top_page_ref = 1;
session.syspkg = sysp;
}


New post ...

AK
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ashish Shridharan | last post by:
Hi All I have been trying to add a control to the header cell of a datagrid on my ASP.NET page. These controls are defined in the HTML as ASP.NET web controls. They are being added into the...
34
by: Charles Douglas Wehner | last post by:
This is a serious question - but probably one that has been asked many times before. Go to http://wehner.org It has FRAMES. Select ADDISON. The main page (to the right of the buttons) shows...
17
by: Klaus Schulz | last post by:
Hello, for a project I am currently working at, I have to use form-buttons and normal links (a href...) in the same pages together. Both should look the same. No problem with IE and Opera but I...
40
by: Greg G | last post by:
http://risky-biz.com/new/risky.html I finally got DSL service recently, but I haven't forgotten the agony of waiting for the 64th image to load before I can see ANYTHING on a page. So I will...
1
by: andrei | last post by:
Hi Group, I have an aspx form with a variable number of buttons added dynamically, with id's like b01, b02, b03... Whenever I click one of these buttons, the form is posted back. I need to...
3
by: Ed Chiu | last post by:
Hi, I plan to use panel to store multiple HTML text in a web form page, here is the code snippet that add HTML into panel: Dim lit1 As New Literal lit1.Text = strHTML...
2
by: AA Arens | last post by:
During my database construction, I left the names of the buttons, comboboxes named by default like Combo77, Command43. I can rename them with Properties Other Name, but them I start getting...
3
by: Daniel Manes | last post by:
I need a strategy to debug this situation... I can't put all the code involved, but here are some of the critical lines with comments: ------------------------- Private _parentDataCell As...
45
by: Master Programmer | last post by:
- Constant language / system changes - Dropping of the VB language - Security configuation minefields - Loss of old code base - Time consuming to learn (then it changes every 5 minutes) - Slow...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.