472,334 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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="ADview2.uc_Banner1"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>

<script type="text/javascript" language="JavaScript">
<!--
function resizeStuff() {
var browser_width;
browser_width = document.body.clientWidth;
document.getElementById('imgColorBar').width=brows er_width;

document.getElementById('navbar').left=browser_wid th-document.getElementById('navbar').width;
debugger;
}
-->
</script>

<LINK href="ADview2Styles.css" type="text/css" rel="stylesheet">
<asp:imagebutton id="imgLogo" style="DISPLAY: inline; LEFT: 6px; POSITION:
absolute; TOP: 0px" ImageUrl="images\logo_small.png"
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="pagetitle" >PAGE
TITLE</asp:label>
<!---->
<IMG id="imgColorBar" alt="" src="images\imgColorBar.png" style="DISPLAY:
inline; LEFT: 6px; POSITION: absolute; TOP: 40px"
Height="20" Width="752">
<!---->
<asp:label id="stInstructions" style="DISPLAY: inline; LEFT: 6px; POSITION:
absolute; TOP: 64px"
Runat="server" CssClass="stepdescription" 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.aspx"
onmouseover="MM_swapImage('button_home','','http://localhost/adview2/toolbar/button_home_f2.gif',1);"
onmouseout="MM_swapImgRestore();" ><img name="button_home" alt="home"
src="http://localhost/adview2/toolbar/button_home.gif" width="34" height="33"
border="0"></A></td>
<td><a href="frmChecklist.aspx"
onMouseOver="MM_swapImage('button_checklist','','h ttp://localhost/adview2/toolbar/button_checklist_f2.gif',1);"
onMouseOut="MM_swapImgRestore();" ><img name="button_checklist" alt="checklist"
src="http://localhost/adview2/toolbar/button_checklist.gif" width="37"
height="32" border="0"></a></td>
</tr>
</table>

<script type="text/javascript" language="JavaScript">

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

Jul 19 '05 #1
0 2941

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

Similar topics

3
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...
6
by: Kor | last post by:
Hi, Does anybody understand why the technique described in...
2
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...
3
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...
1
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...
4
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...
8
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...
3
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...
3
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...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

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.