|
-
Sep 4th, 2004, 12:41 PM
#1
Thread Starter
Fanatic Member
textcolor!!
Hi there,
the problem with the following script is that I can not change
the font color and I can not move the "text box"
hope you help me
thanks
//*********************
<script>
function write2()
{
document.for1.text1.value="HELLO my friends"
document.bgColor="yellow";
document.for1.buto1.value="up--up--+++";
document.for1.buto2.value="down---down--";
document.fontColor="blue";
document.for1.text1.style.posLeft=document.for1.text1.style.posLeft=500;
}
</script>
with my best wishes
<br>
<form name=for1>
<input type=text name=text1 value="10" size=20><br>
<input type=button name=buto1 value="up+++++"onclick="javascript:text1.value++"><BR>
<input type=button name=buto2 value="DOWN--" onclick="javascript:text1.value--"><br>
<input type=button name=buto3 value="yellow-hello" onclick="javascript:write2()"><br>
<input type=button name=buto4 value="back to num" onclick="javascript:text1.value=10"><br>
<input type=button name=buto5 value="refresh" onclick="javascript:location.reload()">
</form>
-
Sep 6th, 2004, 06:25 AM
#2
Frenzied Member
Code:
document.style.backgroundColor="yellow";
document.for1.text1.style.left=document.for1.text1.style.left=500;
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Sep 6th, 2004, 09:59 AM
#3
Frenzied Member
Shouldn't it be
Code:
document.for1.text1.style.left=document.for1.text1.style.left+500;
?
And I'd suggest giving it an ID and referencing it by that...
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
-
Sep 7th, 2004, 11:36 AM
#4
Thread Starter
Fanatic Member
this works ,too
---------------------------------------
document.fgColor="red";
--------------------------------------
Last edited by merhaba; Sep 8th, 2004 at 12:09 PM.
-
Sep 8th, 2004, 06:02 AM
#5
Frenzied Member
Yes, but I think you should stick to either using html or styles. So pick one and continue using that (i suggest styles, more forward compatible).
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Sep 8th, 2004, 06:03 AM
#6
Frenzied Member
don't foget to add the "px" on the end of the style attributes.
Have I helped you? Please Rate my posts. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|