aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Double Byte Character Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Double Byte Character "%" validation needed in Javascript" Watch "Double Byte Character "%" validation needed in Javascript" New topic
Author

Double Byte Character "%" validation needed in Javascript

Cecil Antony
Greenhorn

Joined: May 13, 2005
Posts: 5
Hi,
Suppose a Double Character "%" is entered in one of the TextField. I need a Javascript Validation. Is it possible from the Javascript?

Please help me in this regard!

Thanks
Cecil.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You question is not clear on what you wanted exactly, but I tried:



Eric
Cecil Antony
Greenhorn

Joined: May 13, 2005
Posts: 5
Hi Eric,

Thanks a lot for your help in this regard. This regards to the double byte which is like charset is UTF-8 and the usage of Japanese/Chinese Keyboard. The "%" in this is different than that we use in regular keyboards.Its of a double byte one.

I'm pasting the simple code for this.

<html<
<script language="Javascript"<
function Check()
{
alert(document.f1.t1.value);
if(document.f1.t1.value.length == 1)
{
if(document.f1.t1.value == "%")
{
alert(document.f1.t1.value.length);
}

}
}

</script<
<body<
<form name="f1" action="" method=""<
<input type="text" name="t1"<
<input type="button" value="Submit";
</form<
</body<
</html<


Please kindly help in this regard!!!

Thanks
Cecil.C.
 
wood burning stoves
 
subject: Double Byte Character "%" validation needed in Javascript