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

BGColor

December 18, 2005

lol Another item that doesn't seem right... BGColor? I want to change the
back color of the web form at runtime, but it appears that bccolor is a
member of the Body element (not located under Me) and therefore I can't find
a way to manipulate it at runtime? Thanks!

--

Joseph Bittman
Microsoft Certified Solution Developer
Microsoft Most Valuable Professional -- DPM

Blog/Web Site: http://71.39.42.23/


Dec 19 '05 #1
1 1089
"Joseph Bittman MVP MCSD" <Ry*********@msn.com> schrieb:
lol Another item that doesn't seem right... BGColor? I want to change the
back color of the web form at runtime, but it appears that bccolor is a
member of the Body element (not located under Me) and therefore I can't
find a way to manipulate it at runtime?


I am not very familiar with ASP.NET, but I would use a client-side script
for this purpose (JScript, VBScript, JavaScript, ...):

\\\
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>...</title>
<script type="text/vbscript" language="vbscript">
Sub Button1_Click()
window.document.body.bgColor = "#FF0000"
End Sub
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:Button
ID="Button1"
runat="server"
Text="Button"
OnClientClick="jscript:Button1_Click();"
/>
</form>
</body>
</html>
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Dec 19 '05 #2

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

Similar topics

4
by: A.S. | last post by:
Hi, I have the following simple code: <TABLE><TR> <TD BGCOLOR="#FFFFFF" ONCLICK="myform.color.value = this.bgcolor">hello</TD> </TR></TABLE> <FORM ACTION="hello.cgi" NAME="myform"...
6
by: Tim Johnson | last post by:
Hello All: Using javascript to dynamically add row elements to a table. as in ..... row.setAttribute("bgcolor",rowColor); // or cell.setAttribute("bgcolor",rowColor); Using firefox or...
15
by: @sh | last post by:
Trying to do this, but its not working...?! My aim being to change the bgcolor of the cell upon which the user has rolled over, I'll then replicate this as an OnMouseOut to change it back. ...
3
by: Peter Merwood | last post by:
Hi I've developed a simple ASP.NET page using Visual Studio 2003. On the page are a number of tables which I have shaded the background of using the bgcolor table attribute/property. My HTML...
6
by: acord | last post by:
Hi, I want to change the background color of a ul/li row, but the following code is not working as I expected. It works in <table><tr>... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...
12
by: GaryDean | last post by:
In the original post I failed so indicate that I am using framework 1.1....... I need to be able to change the background color of a page from code. I found an answer to this question in...
3
Duchesse
by: Duchesse | last post by:
Hoi! Does anyone know how to make the bgcolor in HTML different than the background color of my SWF movie. I've tried playing around with the bgcolor in <body> and the bgcolor in the SWF parameters...
4
by: Don Lancaster | last post by:
I set up a table... <table bgcolor=#FF9966 name=msSel onmouseover="msSel.bgColor='#FFCC66'" onmouseout="differentFunction ();" <tr><td>stuff</tr></td> mouseout is eventully supposed to do...
5
by: Don Lancaster | last post by:
I am trying to change a group of background colors by calculating their names in a loop . Names are cfh13, cfh15, cfh17, etc... Unlooped code like cfh17.bgColor="#CCFFFF" ; works just fine....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...
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,...

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.