473,706 Members | 2,414 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 3024

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

Similar topics

3
1590
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 is what I have below. What we have to do is make the app run so that it allows the user to add...
6
1558
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 http://www.quirksmode.org/dom/w3c_html.html )
2
1374
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
2734
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 creat multiple copies of the control, unfortunately when I do this the different controls act like...
1
2076
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 submit the form to an asp.net page. For some reason when the link is clicked, you can see the items all...
4
2532
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 to move an item to the top of a list. Any ideas welcome. TIA
8
1540
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 works great.
3
1515
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 itself and populate it with the selected name's addresses. The user control is a combination of an...
3
2026
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
8781
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 usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8697
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9286
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9156
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9055
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8997
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5939
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2502
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2095
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.