Fixy-Fact
Hi,

Are you a member? Please Log In. If not, please click 'Register' on above menu. Quick to register and simply just click here to make an account, this account will become your identity while you enjoy full features of Fixy-Fact forum and make sure you fill in data with correctly.

Make sure you read terms of agreement in our forum to prevent disobedient, click here to go.

Thank you for your concern!

Best,
Fixy-Fact Team

[ask] membuat Textarea "Count-up", Bukan textarea biasa

Go down

[ask] membuat Textarea "Count-up", Bukan textarea biasa

Post by oxyz88 on Fri Feb 11, 2011 5:24 pm

Permisi, para sepupuh..
sebelumnya maaf kl salah kamar,sy rasa disini tempat yg paling tepat..


nubi pengen numpang tanya nih tentang kode html/javascript/php/semacamnya...
kasus ga rumit kok, hanya nubi ga paham aja... (-_-)

ok, dimulai ya... Silent Smile

Sy pengen add fungsi (yg sy kira ini adalah) Textarea "Count-Up"

bukan TextCounter yg seperti ini:


tapi yg sperti ini:


atau silahkan langsung dicoba di TextCounter - Count Up
*Bukan Bermaksud Promosi*

Jadi, yg sy inginkan adalah sebuah textarea yg berfungsi untuk menghitung jumlah text, dan dimulai dari 0. Bukan Text Limiter seperti pada gambar pertama...


Mohon Bantuannya...

Reputation Ready... Smiley Beer
avatar
oxyz88
Fixy-Fact Citizen
Fixy-Fact Citizen

Posts : 45
Credits : 78
Reputation : 5
City : Jakarta
Browser : Mozilla Firefox

View user profile http://www.joeadvertising.wordpress.com

Back to top Go down

Re: [ask] membuat Textarea "Count-up", Bukan textarea biasa

Post by τεχνολογία on Sat Feb 12, 2011 10:24 am

Code:
<html>
<head>
<script language=javascript>
var start = "0";
var count1 = "1";
var count2 = "32";
var count3 = "48";
function counter(){
var tex = document.myform.comment.value;
var len = tex.length;
var mess = tex.length;

if (len > count3) {
mess = 3;
} else {
if (len > count2) {
mess = 2;
} else {
if (len > count1) {
mess = 1;
}
}
}

document.myform.count.value = 0+len;
document.myform.messCount.value = mess;
}

</script>

</head>

<body>

<form name="myform" METHOD=POST>
<textarea name=comment wrap=physical rows=3 cols=40 onkeyup=counter()></textarea><br>
<script language=javascript>
document.write("<input type=text name=count size=4 readonly value="+start+">");
document.write("<input type=text name=messCount size=4 readonly value="+start+">");
</script>
</form>

</body>
</html>

or http://www.javascriptkit.com/script/script2/charcount.shtml
avatar
τεχνολογία
Fixy-Fact Citizen
Fixy-Fact Citizen

Posts : 18
Credits : 5052
Reputation : 3
City : MARS
Browser : Mozilla Firefox

View user profile

Back to top Go down

Re: [ask] membuat Textarea "Count-up", Bukan textarea biasa

Post by oxyz88 on Sat Feb 12, 2011 1:28 pm

oh, javascript ya,bukan html code...

thanks,om..

tapi kok ga bisa dipasang di webpage sy ya?
sy paste di HTML EDITOR, pas disave, nongolnya cuma halaman kosong...

apa ada code khusus lg ya?
avatar
oxyz88
Fixy-Fact Citizen
Fixy-Fact Citizen

Posts : 45
Credits : 78
Reputation : 5
City : Jakarta
Browser : Mozilla Firefox

View user profile http://www.joeadvertising.wordpress.com

Back to top Go down

Re: [ask] membuat Textarea "Count-up", Bukan textarea biasa

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum