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

How to change a line's color??

Hey gurus,

I am writing a beginner JS program to change a line color from black to
red ("255, 0, 0"), however, I cound not get it done...

I was thinking like:

this.Line1.border.edge.color.value = "255, 0, 0";

But how come it did not work????

Thanks!!!

Aug 21 '06 #1
4 3208
pkid wrote on 21 aug 2006 in comp.lang.javascript:
I am writing a beginner JS program to change a line color from black to
red ("255, 0, 0"), however, I cound not get it done...

I was thinking like:

this.Line1.border.edge.color.value = "255, 0, 0";

But how come it did not work????
because it is not DOM and not javascript.
edge? and a value value "255, 0, 0" ???
did you make thes words up?

try:

<span
onclick = "this.style.color='#f00'"
style='cursor:hand;color:green;'>
Click me to change my text color to red.</span>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 21 '06 #2
Evertjan,

Is there a way like I said: this.Line1.border.edge.color.value = "255,
0, 0";

You know I am writing this in Adobe LiveCycle, basically it is a JS for
an Adobe Form.

So...

Thanks!!!
Evertjan. 写道:
pkid wrote on 21 aug 2006 in comp.lang.javascript:
I am writing a beginner JS program to change a line color from black to
red ("255, 0, 0"), however, I cound not get it done...

I was thinking like:

this.Line1.border.edge.color.value = "255, 0, 0";

But how come it did not work????

because it is not DOM and not javascript.
edge? and a value value "255, 0, 0" ???
did you make thes words up?

try:

<span
onclick = "this.style.color='#f00'"
style='cursor:hand;color:green;'>
Click me to change my text color to red.</span>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 21 '06 #3
pkid wrote on 21 aug 2006 in comp.lang.javascript:
Evertjan. 写道:
>pkid wrote on 21 aug 2006 in comp.lang.javascript:
I am writing a beginner JS program to change a line color from
black to red ("255, 0, 0"), however, I cound not get it done...

I was thinking like:

this.Line1.border.edge.color.value = "255, 0, 0";

But how come it did not work????

because it is not DOM and not javascript.
edge? and a value value "255, 0, 0" ???
did you make thes words up?

try:

<span
onclick = "this.style.color='#f00'"
style='cursor:hand;color:green;'>
Click me to change my text color to red.</span>
[please do not toppost on usenet]
Is there a way like I said: this.Line1.border.edge.color.value = "255,
0, 0";
I doubt it, as I replied.

= rgb("255,0,0"); perhaps
You know
No, I did not.
I am writing this in Adobe LiveCycle, basically it is a JS
for an Adobe Form.
How could we know, since you did not specify?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 21 '06 #4
pkid said the following on 8/21/2006 10:34 AM:

Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
Evertjan,

Is there a way like I said: this.Line1.border.edge.color.value = "255,
0, 0";
Maybe, depending on Adobe's support.

What does "this" refer to in that context? The Form, the input element,
or what?

elementReference.style.borderColor="red";
You know I am writing this in Adobe LiveCycle,
We did? You think we are mind-readers? You should have specified that to
begin with.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 21 '06 #5

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

Similar topics

2
by: Daniel Lidstrm | last post by:
Hi, I would like to know the cleanest way to change the serialization of my Line class from: <Line staStart="2327.02" length="10.00000003390744"> <End>549016.570965 57945.741122</End>...
0
by: beanweed | last post by:
BACKGROUND ---------- I have an ASP.NET application having two panels. In one panel, an XML document, transformed using xsl, is displayed. In the other panel are some controls that allow a user...
10
by: Fabrizio | last post by:
(Sorry for the crosspost, but I really don't know which is the right newsgroup!) Hi all, I try to change the password to a user that as to change the password at first logon: try {
3
by: Brad Rogers | last post by:
All, Being immersed in vb.net and trying CSharp after almost a year I forgot the differences. I like vb fixing the uppercase/lowercase names and seeming to be more flexible to code entry. ...
7
by: =?Utf-8?B?QnJpYW4gQ29vaw==?= | last post by:
I want to change the font color and weight at a specific position in the text. I am not sure where or what I need to do. It will be at position 155/156 from the left on each line. Here is the...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.