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

JavaScript to Change Table Color

Doing this in VS2008 and VB.Net.

I new at this and don't know how to program in Java. Can someone help me
write a simple little java code to change the backgroup color of my table?

Table ID = OrderTable
DropDownControl= SideDDL

I just want to make it so if the SideDDL Selected.Value ="BUY", the
OrderTable backgroup color is Green. If it's a "SELL", then OrderTable
background color is Red.

Thanks!
Aug 17 '08 #1
3 1101
I'll do you a big favor and refer you to the JavaScript FAQ that has
hundreds of scripts to learn from.

http://irt.org/script/script.htm
http://
"pvong" <phillip*at*yahoo*dot*comwrote in message
news:ei**************@TK2MSFTNGP03.phx.gbl...
Doing this in VS2008 and VB.Net.

I new at this and don't know how to program in Java. Can someone help me
write a simple little java code to change the backgroup color of my table?

Table ID = OrderTable
DropDownControl= SideDDL

I just want to make it so if the SideDDL Selected.Value ="BUY", the
OrderTable backgroup color is Green. If it's a "SELL", then OrderTable
background color is Red.

Thanks!
Aug 17 '08 #2
"pvong" <phillip*at*yahoo*dot*comwrote in message
news:ei**************@TK2MSFTNGP03.phx.gbl...
I new at this and don't know how to program in Java.
Java and JavaScript are not the same thing at all...

Java is a server-side technology similar in some ways to ASP.NET -
JavaScript is a client-side scripting language used (mainly) to provide
dynamic HTML...
Can someone help me write a simple little java code
If you mean JavaScript, you could use something like:

<script type="text/javascript" />
document.getElementById('myTable').bgColor = "yellow";
</script>

However, if you actually do mean Java, then you'd need to post on one of the
Java newsgroups...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 17 '08 #3
Thanks Mark! I didn't know the difference and now I do. I was only talking
about JavaScripts. I'll try your method.


"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:uS**************@TK2MSFTNGP04.phx.gbl...
"pvong" <phillip*at*yahoo*dot*comwrote in message
news:ei**************@TK2MSFTNGP03.phx.gbl...
>I new at this and don't know how to program in Java.

Java and JavaScript are not the same thing at all...

Java is a server-side technology similar in some ways to ASP.NET -
JavaScript is a client-side scripting language used (mainly) to provide
dynamic HTML...
>Can someone help me write a simple little java code

If you mean JavaScript, you could use something like:

<script type="text/javascript" />
document.getElementById('myTable').bgColor = "yellow";
</script>

However, if you actually do mean Java, then you'd need to post on one of
the Java newsgroups...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 18 '08 #4

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

Similar topics

2
by: Halldor Isak Gylfason | last post by:
I am faced with the task of porting a client application to a web architecture platform, e.g. to make it browser based. The technology I used was J2EE, e.g. servlets/JSP pages and HTML/javascript....
2
by: Brett Baisley | last post by:
Hello I have a block of html code that I want to run by calling a javascript function to print it. Its basically a table with menu items in it that is the same for many pages, and instead of...
3
by: pentium77 | last post by:
Basically I have a situation where I need to update changes occuring in one Text field of a table into another text field located in another table. In addition both the tables are located in...
19
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
7
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
3
by: Peter Williams | last post by:
Hi All, I want to write some javascript for a html page which does the following. Imagine that the page contains a table with 2 columns and 3 rows, e.g.: +---+---+ | A | B | +---+---+
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
2
by: sorobor | last post by:
dear sir .. i am using cakephp freamwork ..By the way i m begener in php and javascript .. My probs r bellow I made a javascript calender ..there is a close button ..when i press close button...
4
by: emily224 | last post by:
Hello, I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer...
1
by: printline | last post by:
Hello All I'm a newbee to javascript/ajax. I have produced a form, where i want to do some validation on some fields. I have used the spry framework and it works fine. Now, i have a select...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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: 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
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...
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,...

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.