473,569 Members | 2,916 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help: repositioning items in a user control using Javascript

This one has me really stumped, so I thought I'd ask publicly.

I was trying to take my ASP.NET web page "template" -- banner graphic, small
navigation bar, and user feedback message area -- and make it into a user
control. I wanted to stretch one of the graphics so it always went all the way
across the browser window. So far, so good... And then, I wanted to take the
two-cell table that holds the naviagation bar and make it always appear on the
far right of the browser window. That didn't work. No matter what I've tried,
it always appears where the initial "style" positioning info says it should.

Can someone help me get this right?

Here is the source for the user control:

<%@ Control Language="vb" AutoEventWireup ="false"
Codebehind="uc_ Banner1.ascx.vb " Inherits="ADvie w2.uc_Banner1"
TargetSchema="h ttp://schemas.microso ft.com/intellisense/ie5" %>

<script type="text/javascript" language="JavaS cript">
<!--
function resizeStuff() {
var browser_width;
browser_width = document.body.c lientWidth;
document.getEle mentById('imgCo lorBar').width= browser_width;

document.getEle mentById('navba r').left=browse r_width-document.getEle mentById('navba r').width;
debugger;
}
-->
</script>

<LINK href="ADview2St yles.css" type="text/css" rel="stylesheet ">
<asp:imagebutto n id="imgLogo" style="DISPLAY: inline; LEFT: 6px; POSITION:
absolute; TOP: 0px" ImageUrl="image s\logo_small.pn g"
Height="39" Width="81" Runat="server"> </asp:imagebutton >
<!---->
<asp:label id="stPageTitle " style="DISPLAY: inline; LEFT: 102px; POSITION:
absolute; TOP: 4px"
Height="32" Width="499px" Runat="server" CssClass="paget itle" >PAGE
TITLE</asp:label>
<!---->
<IMG id="imgColorBar " alt="" src="images\img ColorBar.png" style="DISPLAY:
inline; LEFT: 6px; POSITION: absolute; TOP: 40px"
Height="20" Width="752">
<!---->
<asp:label id="stInstructi ons" style="DISPLAY: inline; LEFT: 6px; POSITION:
absolute; TOP: 64px"
Runat="server" CssClass="stepd escription" Height="64" Width="750">
The quick brown fox jumped over the lazy dogs.
</asp:label>
<!---->
<table id='navbar' style="DISPLAY: inline; LEFT: 650px; POSITION: absolute; TOP:
2px" cellSpacing="0" cellPadding="0" width="78" height="33" border="0">
<tr>
<td><a href="frmHome.a spx"
onmouseover="MM _swapImage('but ton_home','','h ttp://localhost/adview2/toolbar/button_home_f2. gif',1);"
onmouseout="MM_ swapImgRestore( );" ><img name="button_ho me" alt="home"
src="http://localhost/adview2/toolbar/button_home.gif " width="34" height="33"
border="0"></A></td>
<td><a href="frmCheckl ist.aspx"
onMouseOver="MM _swapImage('but ton_checklist', '','http://localhost/adview2/toolbar/button_checklis t_f2.gif',1);"
onMouseOut="MM_ swapImgRestore( );" ><img name="button_ch ecklist" alt="checklist"
src="http://localhost/adview2/toolbar/button_checklis t.gif" width="37"
height="32" border="0"></a></td>
</tr>
</table>

<script type="text/javascript" language="JavaS cript">

<!--
window.onload=r esizeStuff;
window.onresize =resizeStuff;
-->
</script>

Jul 19 '05 #1
0 3009

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

Similar topics

3
1582
by: Mike | last post by:
Hey guys I am pulling my hair out on this problem!!!!! Any help or ideas or comments on how to make this work I would be grateful! I have been working on this for the past 4 days and nothing I do seems to get me any closer to the solution. Below is a program that I am working on for a class project. The original code was provided for us which...
6
1549
by: Kor | last post by:
Hi, Does anybody understand why the technique described in http://www.macromedia.com/devnet/server_archive/articles/css_positioning_dynamic_repositioning.html doesnt work in Netscape 6/7 and Mozilla? I tried it out but to no avail. I am certainly not a (javascript) programmer / DOM expert but it seems to me it should work (see for example...
2
1365
by: Alan Little | last post by:
It seems to me I saw something about this once, but I can't find anything about it now. Is it possible to disable menu items, perhaps with a signed script? -- Alan Little Phorm PHP Form Processor http://www.phorm.com/
3
2725
by: anon | last post by:
I am having a hard time with makeing what I am trying to do work. I am making a questionaire web app. I have a custom control that has a label and 5 radio buttons. My problem is that each different topic for the questionaire is in a database and each questionaire will have a different number of questions. I am trying to use a repeater to...
1
2064
by: Mad Scientist Jr | last post by:
I'm stuck trying to work with a HTML <SELECT> control and javascript (similar to DualList but that control doesn't offer enough options to totally control the text on the buttons and control, also I don't have c# on this machine to try and modify it).. anyway... I'm trying to get javascipt to select all items in a <SELECT> control and...
4
2527
by: Alan Silver | last post by:
Hello, I have a repeater showing a list of items and I would like to be able to allow the user to change the order of the items. I have absolutely no idea how to go about this, other than having a pair of Move Up/Down buttons, which would result in a postback for every single move. This would be very slow and frustrating for a user trying...
8
1532
by: RCS | last post by:
All, OK, so I'm working on a template for our new ASP.NET applications. Part of this, includes using the new menu and breadcrumbs control in ASP.NET 2.0 (I'm using beta 2). I put the hierarchy of the applications and navigation in a database, and am able to pull that into the app by inheriting StaticSiteMapProvider. So that's set and...
3
1501
by: Joe | last post by:
Hello All, I am developing a webform which creates ArrayLists of people's names and addresses (the values are retrieved from an xml file) and dynamically drops a user control onto the webform and populates it with the required names. Once the user selects a name, the webform will then drop another user control (the same control) onto...
3
2021
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, I have web user control (c# code-behind) and i'm trying to create a property that will provide the user with a drop down list of values inside the property box for that web user control instance and I'm having trouble with the syntax, can someone please help me? thanks, rodchar
0
7693
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7917
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7665
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7962
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2105
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.