help

J

JL

Hi , why this not work ; I want to change the color of The textarea exemple:


<input style="background:#33CC33" value=" " onClick="
document.titre.exemple. backGroundcolor = #33CC33 " type="button" />

Tanks for answer.
JL
 
B

Beauregard T. Shagnasty

JL said:
Hi , why this not work ; I want to change the color of The textarea
exemple:

The URL to your page would be helpful.
<input style="background:#33CC33" value=" " onClick="
document.titre.exemple. backGroundcolor = #33CC33 " type="button" />

I pasted your code into a page, and it worked for me (oddly enough). Why
is the JavaScript there, and why is there a space after the misspelled
word "exemple".

<input style="background:#33CC33" value=" This is a button "
onClick="document.titre.exemple.backGroundcolor = #33CC33" type="button"
/>

Why the bogus XHTML slash at the end? [ /> ]
 
B

Beauregard T. Shagnasty

Oh, wait. Your prose says "color of The textarea"... yet your code is of
type="button". What is it you really want?
The URL to your page would be helpful.

...and the above reinforces that statement, eh? A more concise Subject
line would be advised as well. Perhaps "Trouble with button color"
 
R

richard

Hi , why this not work ; I want to change the color of The textarea exemple:


<input style="background:#33CC33" value=" " onClick=" document.titre.exemple. backGroundcolor = #33CC33 " type="button" />

Tanks for answer.
JL

Start by checking your spelling.

TITLE not titre
EXAMPLE not exemple

Caps in attributes may cause problems as well.
background not backGround.
 
R

richard

Oh, wait. Your prose says "color of The textarea"... yet your code is of
type="button". What is it you really want?


..and the above reinforces that statement, eh? A more concise Subject
line would be advised as well. Perhaps "Trouble with button color"

I believe he is attempting to change the color of the "text area" when
the original block is clicked upon.
 
B

Beauregard T. Shagnasty

richard said:
I believe he is attempting to change the color of the "text area"
when the original block is clicked upon.

I thought that as well, but discarded it as both color values are the
same.
TITLE not titre <-- might be in his native language^1
EXAMPLE not exemple <-- probably wrong

Caps in attributes may cause problems as well.
background not backGround.

'Cept that's JavaScript, where camelCase is used.
http://4umi.com/web/javascript/camelcase.php

1. I don't speak French.
 
A

Awful Dog Autry

Hi , why this not work ; I want to change the color of The textarea
exemple:


<input style="background:#33CC33" value=" " onClick="
document.titre.exemple. backGroundcolor = #33CC33 " type="button" />

Tanks for answer.
JL

Well, it would help if you have an and I knew the id for the textarea.
Let's give it "txar", then try this -

<input style="background:#33CC33" value=" " onClick="
document.getElementById('txar').style.background='#cc33cc'"
type="button" />
 
J

JL

Awful Dog Autry a écrit :
Well, it would help if you have an and I knew the id for the textarea.
Let's give it "txar", then try this -

<input style="background:#33CC33" value=" " onClick="
document.getElementById('txar').style.background='#cc33cc'"
type="button" />
Ok it works Tanks à lot
JL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top