Javascript again lol
3 posters
Page 1 of 1
Javascript again lol
I have a text box. On my forum. *points to profile*
This text box is a word count tool.
It is located on the bottom-left of the forum, as a widget.
The colour of the typed text is white.
The background colour of the box is white.
Alas, you cannot see the text.
How can I make the text, let's say... Orange, when I type in that box?
Here's the code...
This text box is a word count tool.
It is located on the bottom-left of the forum, as a widget.
The colour of the typed text is white.
The background colour of the box is white.
Alas, you cannot see the text.
How can I make the text, let's say... Orange, when I type in that box?
Here's the code...
- Code:
<form method="POST" name="wordcount">
<script language="JavaScript">
function countit(){
<center>
<SCRIPT LANGUAGE="javascript">
document.write
var formcontent=document.wordcount.wordcount2.value
formcontent=formcontent.split(" ")
document.wordcount.wordcount3.value=formcontent.length
}
</script>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%"><textarea rows="12" name="wordcount2" cols="24" wrap="virtual"></textarea></td>
</tr>
<tr>
<td width="50%"><div align="right"><p><input type="button" value="Calculate Words"
onClick="countit()"> <input type="text" name="wordcount3" size="20"></p>
</center></div></div></td>
</FONT>
</SCRIPT>
</tr>
</table>
</form>
Re: Javascript again lol
Here yo go :
<html>
<body>
<script language="JavaScript" type="text/javascript">
<!--
function changeTextColor(textcolor){
document.getElementById("fontColor").style.color = textcolor.value;
}
//-->
</script>
</body>
</html>
<form method="POST" name="wordcount">
<script language="Javascript">
function countit(){
<center>
<script LANGUAGE="javascript">
document.write
var formcontent=document.wordcount.wordcount2.value
formcontent=formcontent.split(" ")
document.wordcount.wordcount3.value=formcontent.length
}
</script>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%"><textarea rows="12" name="wordcount2" cols="24" wrap="virtual" id="fontColor" style="color:orange;" onchange="changeTextColor(this);"></textarea></td>
</tr>
<tr>
<td width="50%"><div align="right"><p><input type="button" value="Calculate Words"
onClick="countit()" > <input type="text" name="wordcount3" size="20" id="fontColor" style="color:orange;" onchange="changeTextColor(this);"></p>
</center></div></div></td>
</FONT>
</script>
</tr>
</table>
</form>
<html>
<body>
<script language="JavaScript" type="text/javascript">
<!--
function changeTextColor(textcolor){
document.getElementById("fontColor").style.color = textcolor.value;
}
//-->
</script>
</body>
</html>
<form method="POST" name="wordcount">
<script language="Javascript">
function countit(){
<center>
<script LANGUAGE="javascript">
document.write
var formcontent=document.wordcount.wordcount2.value
formcontent=formcontent.split(" ")
document.wordcount.wordcount3.value=formcontent.length
}
</script>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%"><textarea rows="12" name="wordcount2" cols="24" wrap="virtual" id="fontColor" style="color:orange;" onchange="changeTextColor(this);"></textarea></td>
</tr>
<tr>
<td width="50%"><div align="right"><p><input type="button" value="Calculate Words"
onClick="countit()" > <input type="text" name="wordcount3" size="20" id="fontColor" style="color:orange;" onchange="changeTextColor(this);"></p>
</center></div></div></td>
</FONT>
</script>
</tr>
</table>
</form>
Guest- Guest
Re: Javascript again lol
Wow, that's a lot of code! Thank you so much!
Edit: For future reference, how do you change the colour of the text box itself? (Using black as an example if it retains a white outline!
Edit: For future reference, how do you change the colour of the text box itself? (Using black as an example if it retains a white outline!
Re: Javascript again lol
Future reference so I'll know how to change colours of text (which I now do) and background colour (which I don't know)
Re: Javascript again lol
- Code:
id="fontColor" style="color:[color=orange]orange[/color];" onchange="changeTextColor(this);"
Guest- Guest
Re: Javascript again lol
Actually I was looking for background colour 0.o
Never mind, someone messaged me and I have it now. Thanks anyway.
Never mind, someone messaged me and I have it now. Thanks anyway.
Re: Javascript again lol
Urh. The script broke and now it won't calculate words.
Nothing happens after typing and pressing "calculate words"
Nothing happens after typing and pressing "calculate words"
- Code:
<html>
<body>
<script language="Javascript" type="text/javascript">
<!--
function changeTextColor(textcolor){
document.getElementById("fontColor").style.color = textcolor.value;
}
//-->
</script>
</body>
</html>
<form method="POST" name="wordcount">
<script language="Javascript">
function countit(){
<center>
<script LANGUAGE="javascript">
document.write
var formcontent=document.wordcount.wordcount2.value
formcontent=formcontent.split(" ")
document.wordcount.wordcount3.value=formcontent.length
}
</script>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%">
<textarea rows="12" name="wordcount2" cols="24" wrap="virtual" id="fontColor" style="color:orange; background-color:black; border:white 2px solid" onchange="changeTextColor(this);"></textarea></td>
</tr>
<tr>
<td width="50%"><div align="right">
<p>
<input type="button" value="Calculate Words"
onClick="countit()" >
<input type="text" name="wordcount3" size="20" id="fontColor" style="color:orange; background-color:black; border:white 2px solid" onchange="changeTextColor(this);">
</p></center></div></div></td>
</FONT>
</script>
</tr>
</table>
</form>
Re: Javascript again lol
I think the coding may have messed up the number generator or it got edited somehow.
Re: Javascript again lol
It didn't work yesterday when it was first posted. I wondered if all the code had been copied/pasted.
Re: Javascript again lol
Boffer, that is strange. It worked for me. Yes, I did copy and paste it all.
Can anyone identify the missing segment?
Can anyone identify the missing segment?
Re: Javascript again lol
Javascript website which it worked on.
I saw it when an affilated person ha word count and below it was link to the site. I needed a word count so I followed link to site.
His word count worked
I saw it when an affilated person ha word count and below it was link to the site. I needed a word count so I followed link to site.
His word count worked
Re: Javascript again lol
How about this:
- Code:
<body>
<script language="Javascript" type="text/javascript">
<!--
function changeTextColor(textcolor){
document.getElementById("fontColor").style.color = textcolor.value;
}
//-->
</script>
</body>
<form method="POST" name="wordcount">
<script language="JavaScript">
function countit(){
var formcontent=document.wordcount.wordcount2.value
formcontent=formcontent.split(" ")
document.wordcount.wordcount3.value=formcontent.length
}
</script>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><textarea style="background: black" rows="12" name="wordcount2" id="fontColor" style="color:orange;" onchange="changeTextColor(this); cols="60" wrap="virtual"></textarea></td>
</tr>
<tr>
<td width="100%"><div align="right"><p><input type="button" value="Calculate Words"
onClick="countit()"> <input type="text" style="background: black" name="wordcount3" size="20"></p>
</td>
</tr>
</table>
</form>
Guest- Guest
Re: Javascript again lol
- Code:
<form method="POST" name="wordcount">
<script language="JavaScript">
function countit(){
/*Word count script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/
var formcontent=document.wordcount.wordcount2.value
formcontent=formcontent.split(" ")
document.wordcount.wordcount3.value=formcontent.length
}
</script>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><textarea rows="12" name="wordcount2" cols="60" wrap="virtual"></textarea></td>
</tr>
<tr>
<td width="100%"><div align="right"><p><input type="button" value="Calculate Words"
onClick="countit()"> <input type="text" name="wordcount3" size="20"></p>
<div align="center">
</div></div></td>
</tr>
</table>
</form>
kieran1- Forumember
- Posts : 69
Reputation : 0
Language : English
Location : USA
Re: Javascript again lol
What is the above? And I put the one previously posted above other word count.
(There are 2 in 1 box now)
(There are 2 in 1 box now)
Re: Javascript again lol
kieran1 wrote:
- Code:
<form method="POST" name="wordcount">
<script language="JavaScript">
function countit(){
/*Word count script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/
var formcontent=document.wordcount.wordcount2.value
formcontent=formcontent.split(" ")
document.wordcount.wordcount3.value=formcontent.length
}
</script>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><textarea rows="12" name="wordcount2" cols="60" wrap="virtual"></textarea></td>
</tr>
<tr>
<td width="100%"><div align="right"><p><input type="button" value="Calculate Words"
onClick="countit()"> <input type="text" name="wordcount3" size="20"></p>
<div align="center">
</div></div></td>
</tr>
</table>
</form>
That's the original code.
Guest- Guest
Re: Javascript again lol
I need original code with the background and border alteration as well as the colour of font >.<
Just, why isn't it working for me?!
Just, why isn't it working for me?!
Re: Javascript again lol
Done some fiddling but the box still isn't working. I think the button for the script is broken.
The site link is in first post and the box is on the bottom-left of widgets. Type couple words in and press the button below the box. Nothing happens.
The site link is in first post and the box is on the bottom-left of widgets. Type couple words in and press the button below the box. Nothing happens.
Re: Javascript again lol
Its works for me, when i write one word and click calculate its show me 1 in the second field
Guest- Guest
Re: Javascript again lol
I try it on my ipod and my computer, it shows nothing on either?
Yet, I tried it on another site and it worked there.
Strange!
Yet, I tried it on another site and it worked there.
Strange!
Similar topics
» Javascript- More then 1 javascript code
» New Javascript
» Javascript to CSS
» What JavaScript is used here?
» RSS->JavaScript
» New Javascript
» Javascript to CSS
» What JavaScript is used here?
» RSS->JavaScript
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum