473,405 Members | 2,349 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,405 software developers and data experts.

Very Strange Error

Ron
Hi,

I have a client side srcipt control that is giving me some very strange
problems when my Master.Page is layed out using <DIV> tags for the UI layout.
When it is layedout in a <TABLE> style fashion i have no issues.

I do a RegisterClientScriptInclude for the .js files in the code behind of
the master.
This has no problems my scripts are loaded fine.

Were i am seeing the issue is in a loop on the client side script that
determines the
location of the control that activated the client side function call.

It seems to loop only 3 tiems then looses its value set by 'activatorCtl'
which maintains its
value the whole time.

Thanks,
Ron

This is what the loop looks like.

// determine position of activator and where to show the popup

var leftpos = 0;
var toppos = 0;
var aTag = activatorCtl;

do {
aTag = aTag.offsetParent;
leftpos += aTag.offsetLeft;
toppos += aTag.offsetTop;
} while (aTag.tagName != 'BODY');
This is my Master.Page HTML markup

<%@ Master Language="C#" AutoEventWireup="true"
CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head" runat="server">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252" />
<title>Untitled Page</title>
<script type="text/javascript">
/* <![CDATA[ */
function AdjustColumnsHeight()
{
// get a reference to the three DIVS that make up the columns
var centerCol = window.document.getElementById('sk_centercol');
var leftCol = window.document.getElementById('sk_leftcol');

// calculate the max height
var hCenterCol = centerCol.offsetHeight;
var hLeftCol = leftCol.offsetHeight;
var maxHeight = Math.max(hCenterCol, hLeftCol);
// set the height of all 3 DIVS to the max height
centerCol.style.height = maxHeight + 'px';
leftCol.style.height = maxHeight + 'px';
// Show the footer
window.document.getElementById('sk_footer').style. visibility =
'inherit';
}
window.onload = function() { AdjustColumnsHeight(); }
/* ]]> */
</script>
</head>
<body>
<form id="Main" runat="server">
<div id="sk_header">
<div id="sk_header2">
<div id="sk_headermenu">
</div>
</div>
</div>
<div id="sk_container">
<div id="sk_container2">
<div id="sk_centercol">

<div id="sk_centercolcontent">
<asp:ContentPlaceHolder ID="MainContent"
runat="server" />
</div>
</div>
</div>
<div id="sk_leftcol">
<asp:Menu ID="menuMain" runat="server" BackColor="#F7F6F3"
DynamicHorizontalOffset="-2"
Font-Names="Verdana" Font-Size="12px"
ForeColor="#000000" StaticSubMenuIndent="10px"
DataSourceID="dsSiteMap" Width="170px">
<StaticMenuItemStyle HorizontalPadding="5px"
VerticalPadding="2px" />
<DynamicHoverStyle BackColor="#7C6F57" ForeColor="White"
/>
<DynamicMenuStyle BackColor="#F7F6F3" />
<StaticSelectedStyle BackColor="#5D7B9D" />
<DynamicSelectedStyle BackColor="#5D7B9D" />
<DynamicMenuItemStyle HorizontalPadding="5px"
VerticalPadding="2px" />
<StaticHoverStyle BackColor="#7C6F57" ForeColor="White" />
<DynamicItemTemplate><%# Eval("Text")
%></DynamicItemTemplate>
</asp:Menu>
<asp:SiteMapDataSource ID="dsSiteMap" runat="server" />

<asp:ContentPlaceHolder ID="LeftContent" runat="server" />

<div id="sk_bannerbox">
</div>
</div>
</div>
<div id="sk_footer">
<div id="sk_footertext">

</div>
</div>
</form>
</body>
</html>
Jun 2 '06 #1
0 1323

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

Similar topics

3
by: Shelly | last post by:
I have come across a strange problem. I am setting up a registration screen with username, password, confirm password, and a couple of other things. The submit button is named "Submit". The...
14
by: Allcomp | last post by:
Hello, I have seen something really strange in VB6 If I do a Int ( (5 * 1.2)) , I receive the value 5, but I should receive 6? Is this a bug or something really "normal". I can see that if I...
6
by: leonecla | last post by:
Hi everybody, I'm facing a very very strange problem with a very very simple C program... My goal should be to write to a binary file some numbers (integers), each one represented as a sequence...
2
by: TB | last post by:
I am seeing a very strange problem as follows... I have a loop where a fair amount of processing is going on and near the top of the loop I access a class that has only static helper functions...
5
by: cody | last post by:
I have a very funny/strange effect here. if I let the delegate do "return prop.GetGetMethod().Invoke(info.AudioHeader, null);" then I get wrong results, that is, a wrong method is called and I...
2
by: Shapper | last post by:
Hello, I have this code: Dim cultureList(,) As String = {{"E", "en-GB"}, {"P", "pt-PT"}} Select Case Session("culture") Case "pt-PT" ... Dim cultureList(,) As String =...
2
by: Buddy Ackerman | last post by:
I have a web app that I have setup on numerous web servers. I've set one up for a new client at their hosting facility and cannot get it to connect to their database. I get a "SQL Server does not...
1
by: Don Rixtown | last post by:
I ran into a very strange error tonight. I was working with web services and typed datasets. The web server I was using happens to be on the other end of a virtual network (Hamachi). Everything...
4
by: Efy | last post by:
Hi, I was debugging my JavaScript in VS2005, the script probably had an error some ware (Line 25), after I fixed the error, I am trying to run the page again I am getting the same error "Illegal...
11
by: VijaKhara | last post by:
Hi all, I just write a very simple codes in C and vthere is a very strange bug which I cannot figure out why. The first loop is for v, and the second for k. There is no relationship between v...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.