|
-
Aug 10th, 2003, 09:29 AM
#1
Thread Starter
Addicted Member
measurement of string length
i have the folowing code
function CheckData(frm)
{
alert((frm.Text_ID.Text));
}
frm.Text_ID - is a textbox in a form - how can i measure its string input length
i have tried frm.Text_ID.length - its not really working
so how can i have the length of the text in the text box.
thanks
-
Aug 10th, 2003, 10:20 AM
#2
Code:
alert(String(frm.Text_ID.value).length);
-
Aug 10th, 2003, 10:32 AM
#3
function CheckData(frm)
{
alert((frm.Text_ID.Text));
}
change it to this....
Code:
function CheckData(frm)
{
window.alert((frm.Text_ID.Text.length));
}
here's an example using a textbox that uses " value " rather than " text "...
Code:
<p><FONT face="verdana, arial, helvetica"
size=2>
<INPUT class=bginput tabIndex=1 maxLength=85 size=40
name=title value="testing"></FONT></p>
<p><FONT face="verdana, arial, helvetica" size=2>
</font>
<script language="javascript">
window.alert(title.value.length);
</script>
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
-
Aug 10th, 2003, 01:44 PM
#4
Thread Starter
Addicted Member
thanks thanks
altough those solusions didnt help they gave me great direction - and i solved it thak to u!!!!!
thanks
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
|