Friday, December 11, 2009

JavaScript Enum

JavaScript Enum variable enables you to create the collection of integer based constant values. In this sample we will learn the different type of JavaScript Enum variable syntaxes and retrieving their integer values using special way to get Enum items. Try the sample code below:
<html>
<head>

    <title>Creating Javascript Enum Items</title>
   
</head>
<body onload="Enum()">

    <script type="text/javascript">

    var Days = {"sunday" : 0, "monday" : 1, "tuesday" : 3, "wednesday" : 4, "thursday" : 5, "friday" : 6, "saturday" : 7};

    document.write("<b>Day Names Enumerator=</b> " + Days.friday + "<br />");

    /************************************************************/
   
    function Enum() {}

    Enum.ColorType = {red:0, blue:1, green:2}

    document.write("<b>Enum Function=</b> " + Enum.ColorType.blue + "<br />");

    /************************************************************/
   
    var enumObj = new Object();

    enumObj.fontSize = {small:10, medium:12, large:14}

    document.write("<b>Enum Object=</b> " + enumObj.fontSize.small + "<br />");

    </script>

</body>
</html>

--
ఇట్లు మీ,
చంద్రశేఖర్.

JavaScript Array Object

JavaScript array object allows you to store the multiple values of similar datatype into a single variable. JavaScript Array stores the items at different consecutive index numbers that can be retrieved using JavaScript For loop very easily. In this sample we will learn and practive the different types of JavaScript Array declarations for example dynamic array and length bound array. Now lets the execute the code given in the sample below:
<html>
<head>
    <title>Javascript Array</title>
</head>
<body>

    <script language="javascript" type="text/javascript">
   
    // Array having dynamic length
    var myArr1 =  new Array();
    myArr1[0]  = "John";
    myArr1[1] = "Tim";
    myArr1[2] = "Smith";
    myArr1[3] = "Jack";
   
    document.write("<b>myArr1, Value at index 3 =</b> " + myArr1[3]);
    document.write("<br /><br />");
   
    // Array having fixed size i.e. 3
    var myArr2 =  new Array(3);
    myArr2[0]  = "John";
    myArr2[1] = "Tim";
    myArr2[2] = "Smith";
   
    document.write("<b>myArr2, Value at index 0 =</b> " + myArr2[0]);
    document.write("<br /><br />");
   
    // inline Array items
    var myArr3 = new Array( "John", "Smith", "Tim");
   
    document.write("<b>myArr3, Value at index 2 =</b> " + myArr3[2]);
    document.write("<br /><br />");
   
    // Value overwriting at Array index by re-assigning values
    myArr3[2] = "Jackson";
   
    document.write("<b>myArr3, New value at index 2 =</b> " + myArr3[2]);
    document.write("<br />");
   
    </script>
   
</body>
</html>

--
ఇట్లు మీ,
చంద్రశేఖర్.

Javascript Array

In JavaScript you can also use Arrays likewise in other programming languages, to store the set of values of same datatype in a single variable. To define an Array in JavaScript new Keyword is used.

In JavaScript you can define arrays in two ways. First by leaving the array size blank that allows it to define its size automatically. If you leave the array size undefined, then you add as many values at different index of array. In second way you can define the size of array by passing the integer value for proper memory allocation.


Syntax1:

var myArr = new Array();

Syntax2:
var myArr = new Array(5);

Also note that if you have defined the array size then you can add values for the array indexes 0 to 4. 

Example for array having no size define:

var myArr =  new Array();

myArr[0]  = "John";

myArr[1] = "Tim";

myArr[2] = "Smith";

myArr[3] = "Jack";

Example for array having size limit defined:

var myArr =  new Array(3);

myArr[0]  = "John";

myArr[1] = "Tim";

myArr[2] = "Smith";

One another way of defining an Array in JavaScript:

var myArr = new Array( "John", "Smith", "Tim");

Now you have learnt how to define the arrays in JavaScript, then why to waste time for searching here and there to learn how to display the values stored at the different indexes of array.

You can directly call the array values by passing the specific index of the array: alert(myArr[0]);

Above code will display the value stored at the first i.e. 0th index of array.

If you have passed the two different values for the same index of an Array then calling that particular index will return the last value stored in it. 

E.g.:

var myArr = new Array();

myArr[0] = "John";

myArr[1] = "Smith";

myArr[0] = "Tim";

alert(myArr[0]);

Above code will display the value "Tim" for 0th index.

You can also use the JavaScript for loop to read the each value in sequence from 0th to the last index of array.

Output:

You can see the output of above discussed codes from the following link:

JavaScript Array Object

Learn from JavaScript split function to convert the string into array and read the array values by using for loop in javascript.


--
ఇట్లు మీ,
చంద్రశేఖర్.

SubString String Function 01

JavaScript Substring function returns the part of the provided string starting from the specified index. By default JavaScript substring function returns the substring starting from the specified index to the end of provided string. Lets try the following sample code to understand the functionality:
<html>
<head>
    <title>Javascript Substring String Function 01</title>
</head>
<body>

<script type="text/javascript">

var myString = new String();
myString = "JavaScript SubString";

document.write(myString.substring(11));

</script>

</body>
</html>
JavaScript Substr function returns the part of the provided string starting from the specified starting index. By default JavaScript substr function returns the sub string starting from the specified starting index to the end of provided string. Lets try the following sample code to understand the functionality:
<html>
<head>
    <title>Javascript Substr String Function 01</title>
</head>
<body>

<script type="text/javascript">

var myString = new String();
myString = "JavaScript Substr Sample";

document.write(myString.substr(11));

</script>

</body>
</html>
--
ఇట్లు మీ,
చంద్రశేఖర్.

Replace String Function 01

JavaScript Replace String function allows you to replace the specified string pattern with new string pattern in the provided string. By Default JavaScript Replace function replaces only first occurrence of specified string pattern from the provided string text. Try the sample below to understand the functionality:
<html>
<head>
    <title>Javascript Replace String Function 01</title>
</head>
<body>

<script type="text/javascript">

var myString = new String();

myString = "This is first example";

// by default it will find and replace the
// first occurrence of specified string pattern
document.write(myString.replace(/ /,"-"));

</script>

</body>
</html>

--
ఇట్లు మీ,
చంద్రశేఖర్.

IndexOf String Function 01

JavaScript IndexOf string function returns the starting index of the specified string pattern from the provided string. JavaScript IndexOf function starts traversing the string from left side of the provided string and returns the first occurrence of the specified string pattern. Try the sample below:
<html>
<head>
    <title>Javascript indexOf String Function 01</title>
</head>
<body>

<script type="text/javascript">

var myString = new String();

myString = "This is a sample text to test javascript function.";

document.write(myString.indexOf("s"));
document.write("<br />");

document.write(myString.indexOf("te"));
document.write("<br />");
</script>

</body>
</html>
--
ఇట్లు మీ,
చంద్రశేఖర్.

Is_Numeric () PHP Function

Definition: The is_numeric () function is used to check if a value is a number. This could be used within an if () statement to treat numbers in one way and non-numbers in another. It will return true or false. Numeric strings consist of an optional sign (such as + or -), any number of digits, optional decimal point and optional exponent. It will also identify a hexadecimal number, but only on its own without a sign, decimal or exponent.
Also Known As: Is Numeric, Is Number

Examples:
<?php
if (is_numeric (887))
{
echo "Yes";
} else {
echo "No";
}
?>

Since 887 is a number, this should echo "Yes"

<?php
if (is_numeric ("cake"))
{
echo "Yes";
} else {
echo "No";
}
?>

Since cake is not a number, this should echo "No"


--
Thanks,
B.Chandrashekhar.

Thursday, December 10, 2009

ANSI character set and equivalent Unicode and HTML characters

The ANSI set of 217 characters, also known as Windows-1252, was the standard for the core fonts supplied with US versions of Microsoft Windows up to and including Windows 95 and Windows NT 4. During the lifetime of those two products, Microsoft added the euro currency symbol bringing the number of characters to 218, and introduced a new core set of Pan-European fonts containing the WGL4 (Windows Glyph List 4) character set, with 652 characters.

If you use a version of Windows that is designed for a non-Latin alphabet such as Arabic, Cyrillic, Greek, Hebrew or Thai to view a document that has been typed using the ANSI character set, then characters from these languages may replace some of those in the 128–255 range; this problem will be resolved when Unicode becomes more widely used, because it provides a unique numeric identifier for each character. There are similar problems when transferring ANSI documents to DOS or Macintosh computers, because DOS and MacRoman arrange characters differently in the 128–255 range.

ANSI characters 32 to 127 correspond to those in the 7-bit ASCII character set, which forms the Basic Latin Unicode character range. Characters 160–255 correspond to those in the Latin-1 Supplement Unicode character range. Positions 128–159 in Latin-1 Supplement are reserved for controls, but most of them are used for printable characters in ANSI; the Unicode equivalents are noted in the table below. Entries in the "Entity" column are character entity references that can be used in HTML and should be interpreted correctly by Web browsers that support HTML 4.0.

The characters that appear in the first column of the following table are generated from Unicode numeric character references, and so they should appear correctly in any Web browser that supports Unicode and that has suitable fonts available, regardless of the operating system.

CharacterANSI
 Number 
 Unicode 
Number
 ANSI 
Hex
 Unicode 
Hex
 HTML 4.0 
Entity
Unicode NameUnicode Range
' '32320x20U+0020 spaceBasic Latin
!33330x21U+0021 exclamation markBasic Latin
"34340x22U+0022&quot;quotation markBasic Latin
#35350x23U+0023 number signBasic Latin
$36360x24U+0024 dollar signBasic Latin
%37370x25U+0025 percent signBasic Latin
&38380x26U+0026&amp;ampersandBasic Latin
'39390x27U+0027 apostropheBasic Latin
(40400x28U+0028 left parenthesisBasic Latin
)41410x29U+0029 right parenthesisBasic Latin
*42420x2AU+002A asteriskBasic Latin
+43430x2BU+002B plus signBasic Latin
,44440x2CU+002C commaBasic Latin
-45450x2DU+002D hyphen-minusBasic Latin
.46460x2EU+002E full stopBasic Latin
/47470x2FU+002F solidusBasic Latin
048480x30U+0030 digit zeroBasic Latin
149490x31U+0031 digit oneBasic Latin
250500x32U+0032 digit twoBasic Latin
351510x33U+0033 digit threeBasic Latin
452520x34U+0034 digit fourBasic Latin
553530x35U+0035 digit fiveBasic Latin
654540x36U+0036 digit sixBasic Latin
755550x37U+0037 digit sevenBasic Latin
856560x38U+0038 digit eightBasic Latin
957570x39U+0039 digit nineBasic Latin
:58580x3AU+003A colonBasic Latin
;59590x3BU+003B semicolonBasic Latin
<60600x3CU+003C&lt;less-than signBasic Latin
=61610x3DU+003D equals signBasic Latin
>62620x3EU+003E&gt;greater-than signBasic Latin
?63630x3FU+003F question markBasic Latin
@64640x40U+0040 commercial atBasic Latin
A65650x41U+0041 Latin capital letter ABasic Latin
B66660x42U+0042 Latin capital letter BBasic Latin
C67670x43U+0043 Latin capital letter CBasic Latin
D68680x44U+0044 Latin capital letter DBasic Latin
E69690x45U+0045 Latin capital letter EBasic Latin
F70700x46U+0046 Latin capital letter FBasic Latin
G71710x47U+0047 Latin capital letter GBasic Latin
H72720x48U+0048 Latin capital letter HBasic Latin
I73730x49U+0049 Latin capital letter IBasic Latin
J74740x4AU+004A Latin capital letter JBasic Latin
K75750x4BU+004B Latin capital letter KBasic Latin
L76760x4CU+004C Latin capital letter LBasic Latin
M77770x4DU+004D Latin capital letter MBasic Latin
N78780x4EU+004E Latin capital letter NBasic Latin
O79790x4FU+004F Latin capital letter OBasic Latin
P80800x50U+0050 Latin capital letter PBasic Latin
Q81810x51U+0051 Latin capital letter QBasic Latin
R82820x52U+0052 Latin capital letter RBasic Latin
S83830x53U+0053 Latin capital letter SBasic Latin
T84840x54U+0054 Latin capital letter TBasic Latin
U85850x55U+0055 Latin capital letter UBasic Latin
V86860x56U+0056 Latin capital letter VBasic Latin
W87870x57U+0057 Latin capital letter WBasic Latin
X88880x58U+0058 Latin capital letter XBasic Latin
Y89890x59U+0059 Latin capital letter YBasic Latin
Z90900x5AU+005A Latin capital letter ZBasic Latin
[91910x5BU+005B left square bracketBasic Latin
\92920x5CU+005C reverse solidusBasic Latin
]93930x5DU+005D right square bracketBasic Latin
^94940x5EU+005E circumflex accentBasic Latin
_95950x5FU+005F low lineBasic Latin
`96960x60U+0060 grave accentBasic Latin
a97970x61U+0061 Latin small letter aBasic Latin
b98980x62U+0062 Latin small letter bBasic Latin
c99990x63U+0063 Latin small letter cBasic Latin
d1001000x64U+0064 Latin small letter dBasic Latin
e1011010x65U+0065 Latin small letter eBasic Latin
f1021020x66U+0066 Latin small letter fBasic Latin
g1031030x67U+0067 Latin small letter gBasic Latin
h1041040x68U+0068 Latin small letter hBasic Latin
i1051050x69U+0069 Latin small letter iBasic Latin
j1061060x6AU+006A Latin small letter jBasic Latin
k1071070x6BU+006B Latin small letter kBasic Latin
l1081080x6CU+006C Latin small letter lBasic Latin
m1091090x6DU+006D Latin small letter mBasic Latin
n1101100x6EU+006E Latin small letter nBasic Latin
o1111110x6FU+006F Latin small letter oBasic Latin
p1121120x70U+0070 Latin small letter pBasic Latin
q1131130x71U+0071 Latin small letter qBasic Latin
r1141140x72U+0072 Latin small letter rBasic Latin
s1151150x73U+0073 Latin small letter sBasic Latin
t1161160x74U+0074 Latin small letter tBasic Latin
u1171170x75U+0075 Latin small letter uBasic Latin
v1181180x76U+0076 Latin small letter vBasic Latin
w1191190x77U+0077 Latin small letter wBasic Latin
x1201200x78U+0078 Latin small letter xBasic Latin
y1211210x79U+0079 Latin small letter yBasic Latin
z1221220x7AU+007A Latin small letter zBasic Latin
{1231230x7BU+007B left curly bracketBasic Latin
|1241240x7CU+007C vertical lineBasic Latin
}1251250x7DU+007D right curly bracketBasic Latin
~1261260x7EU+007E tildeBasic Latin
 1271270x7FU+007F (not used) 
12883640x80U+20AC&euro;euro signCurrency Symbols
 1291290x81U+0081 (not used) 
13082180x82U+201A&sbquo;single low-9 quotation markGeneral Punctuation
ƒ1314020x83U+0192&fnof;Latin small letter f with hookLatin Extended-B
13282220x84U+201E&bdquo;double low-9 quotation markGeneral Punctuation
13382300x85U+2026&hellip;horizontal ellipsisGeneral Punctuation
13482240x86U+2020&dagger;daggerGeneral Punctuation
13582250x87U+2021&Dagger;double daggerGeneral Punctuation
ˆ1367100x88U+02C6&circ;modifier letter circumflex accentSpacing Modifier Letters
13782400x89U+2030&permil;per mille signGeneral Punctuation
Š1383520x8AU+0160&Scaron;Latin capital letter S with caronLatin Extended-A
13982490x8BU+2039&lsaquo;single left-pointing angle quotation mark General Punctuation
Œ1403380x8CU+0152&OElig;Latin capital ligature OELatin Extended-A
 1411410x8DU+008D (not used) 
Ž1423810x8EU+017D Latin capital letter Z with caronLatin Extended-A
 1431430x8FU+008F (not used) 
 1441440x90U+0090 (not used) 
'14582160x91U+2018&lsquo;left single quotation markGeneral Punctuation
'14682170x92U+2019&rsquo;right single quotation markGeneral Punctuation
"14782200x93U+201C&ldquo;left double quotation markGeneral Punctuation
"14882210x94U+201D&rdquo;right double quotation markGeneral Punctuation
14982260x95U+2022&bull;bulletGeneral Punctuation
15082110x96U+2013&ndash;en dashGeneral Punctuation
15182120x97U+2014&mdash;em dashGeneral Punctuation
˜1527320x98U+02DC&tilde;small tildeSpacing Modifier Letters
15384820x99U+2122&trade;trade mark signLetterlike Symbols
š1543530x9AU+0161&scaron;Latin small letter s with caronLatin Extended-A
15582500x9BU+203A&rsaquo;single right-pointing angle quotation mark General Punctuation
œ1563390x9CU+0153&oelig;Latin small ligature oeLatin Extended-A
 1571570x9DU+009D (not used) 
ž1583820x9EU+017E Latin small letter z with caronLatin Extended-A
Ÿ1593760x9FU+0178&Yuml;Latin capital letter Y with diaeresis Latin Extended-A
 1601600xA0U+00A0&nbsp; no-break spaceLatin-1 Supplement
¡1611610xA1U+00A1&iexcl;inverted exclamation markLatin-1 Supplement
¢1621620xA2U+00A2&cent;cent signLatin-1 Supplement
£1631630xA3U+00A3&pound;pound signLatin-1 Supplement
¤1641640xA4U+00A4&curren;currency signLatin-1 Supplement
¥1651650xA5U+00A5&yen;yen signLatin-1 Supplement
¦1661660xA6U+00A6&brvbar;broken barLatin-1 Supplement
§1671670xA7U+00A7&sect;section signLatin-1 Supplement
¨1681680xA8U+00A8&uml;diaeresisLatin-1 Supplement
©1691690xA9U+00A9&copy;copyright signLatin-1 Supplement
ª1701700xAAU+00AA&ordf;feminine ordinal indicatorLatin-1 Supplement
«1711710xABU+00AB&laquo;left-pointing double angle quotation mark Latin-1 Supplement
¬1721720xACU+00AC&not;not signLatin-1 Supplement
­1731730xADU+00AD&shy;soft hyphenLatin-1 Supplement
®1741740xAEU+00AE&reg;registered signLatin-1 Supplement
¯1751750xAFU+00AF&macr;macronLatin-1 Supplement
°1761760xB0U+00B0&deg;degree signLatin-1 Supplement
±1771770xB1U+00B1&plusmn;plus-minus signLatin-1 Supplement
²1781780xB2U+00B2&sup2;superscript twoLatin-1 Supplement
³1791790xB3U+00B3&sup3;superscript threeLatin-1 Supplement
´1801800xB4U+00B4&acute;acute accentLatin-1 Supplement
µ1811810xB5U+00B5&micro;micro signLatin-1 Supplement
1821820xB6U+00B6&para;pilcrow signLatin-1 Supplement
·1831830xB7U+00B7&middot;middle dotLatin-1 Supplement
¸1841840xB8U+00B8&cedil;cedillaLatin-1 Supplement
¹1851850xB9U+00B9&sup1;superscript oneLatin-1 Supplement
º1861860xBAU+00BA&ordm;masculine ordinal indicatorLatin-1 Supplement
»1871870xBBU+00BB&raquo;right-pointing double angle quotation mark Latin-1 Supplement
¼1881880xBCU+00BC&frac14;vulgar fraction one quarterLatin-1 Supplement
½1891890xBDU+00BD&frac12;vulgar fraction one halfLatin-1 Supplement
¾1901900xBEU+00BE&frac34;vulgar fraction three quartersLatin-1 Supplement
¿1911910xBFU+00BF&iquest;inverted question markLatin-1 Supplement
À1921920xC0U+00C0&Agrave;Latin capital letter A with graveLatin-1 Supplement
Á1931930xC1U+00C1&Aacute;Latin capital letter A with acuteLatin-1 Supplement
Â1941940xC2U+00C2&Acirc;Latin capital letter A with circumflex Latin-1 Supplement
Ã1951950xC3U+00C3&Atilde;Latin capital letter A with tildeLatin-1 Supplement
Ä1961960xC4U+00C4&Auml;Latin capital letter A with diaeresis Latin-1 Supplement
Å1971970xC5U+00C5&Aring;Latin capital letter A with ring above Latin-1 Supplement
Æ1981980xC6U+00C6&AElig;Latin capital letter AELatin-1 Supplement
Ç1991990xC7U+00C7&Ccedil;Latin capital letter C with cedilla Latin-1 Supplement
È2002000xC8U+00C8&Egrave;Latin capital letter E with graveLatin-1 Supplement
É2012010xC9U+00C9&Eacute;Latin capital letter E with acuteLatin-1 Supplement
Ê2022020xCAU+00CA&Ecirc;Latin capital letter E with circumflex Latin-1 Supplement
Ë2032030xCBU+00CB&Euml;Latin capital letter E with diaeresis Latin-1 Supplement
Ì2042040xCCU+00CC&Igrave;Latin capital letter I with graveLatin-1 Supplement
Í2052050xCDU+00CD&Iacute;Latin capital letter I with acuteLatin-1 Supplement
Î2062060xCEU+00CE&Icirc;Latin capital letter I with circumflex Latin-1 Supplement
Ï2072070xCFU+00CF&Iuml;Latin capital letter I with diaeresis Latin-1 Supplement
Ð2082080xD0U+00D0&ETH;Latin capital letter EthLatin-1 Supplement
Ñ2092090xD1U+00D1&Ntilde;Latin capital letter N with tildeLatin-1 Supplement
Ò2102100xD2U+00D2&Ograve;Latin capital letter O with graveLatin-1 Supplement
Ó2112110xD3U+00D3&Oacute;Latin capital letter O with acuteLatin-1 Supplement
Ô2122120xD4U+00D4&Ocirc;Latin capital letter O with circumflex Latin-1 Supplement
Õ2132130xD5U+00D5&Otilde;Latin capital letter O with tildeLatin-1 Supplement
Ö2142140xD6U+00D6&Ouml;Latin capital letter O with diaeresis Latin-1 Supplement
×2152150xD7U+00D7&times;multiplication signLatin-1 Supplement
Ø2162160xD8U+00D8&Oslash;Latin capital letter O with strokeLatin-1 Supplement
Ù2172170xD9U+00D9&Ugrave;Latin capital letter U with graveLatin-1 Supplement
Ú2182180xDAU+00DA&Uacute;Latin capital letter U with acuteLatin-1 Supplement
Û2192190xDBU+00DB&Ucirc;Latin capital letter U with circumflex Latin-1 Supplement
Ü2202200xDCU+00DC&Uuml;Latin capital letter U with diaeresis Latin-1 Supplement
Ý2212210xDDU+00DD&Yacute;Latin capital letter Y with acuteLatin-1 Supplement
Þ2222220xDEU+00DE&THORN;Latin capital letter ThornLatin-1 Supplement
ß2232230xDFU+00DF&szlig;Latin small letter sharp sLatin-1 Supplement
à2242240xE0U+00E0&agrave;Latin small letter a with graveLatin-1 Supplement
á2252250xE1U+00E1&aacute;Latin small letter a with acuteLatin-1 Supplement
â2262260xE2U+00E2&acirc;Latin small letter a with circumflex Latin-1 Supplement
ã2272270xE3U+00E3&atilde;Latin small letter a with tildeLatin-1 Supplement
ä2282280xE4U+00E4&auml;Latin small letter a with diaeresisLatin-1 Supplement
å2292290xE5U+00E5&aring;Latin small letter a with ring above Latin-1 Supplement
æ2302300xE6U+00E6&aelig;Latin small letter aeLatin-1 Supplement
ç2312310xE7U+00E7&ccedil;Latin small letter c with cedillaLatin-1 Supplement
è2322320xE8U+00E8&egrave;Latin small letter e with graveLatin-1 Supplement
é2332330xE9U+00E9&eacute;Latin small letter e with acuteLatin-1 Supplement
ê2342340xEAU+00EA&ecirc;Latin small letter e with circumflex Latin-1 Supplement
ë2352350xEBU+00EB&euml;Latin small letter e with diaeresisLatin-1 Supplement
ì2362360xECU+00EC&igrave;Latin small letter i with graveLatin-1 Supplement
í2372370xEDU+00ED&iacute;Latin small letter i with acuteLatin-1 Supplement
î2382380xEEU+00EE&icirc;Latin small letter i with circumflex Latin-1 Supplement
ï2392390xEFU+00EF&iuml;Latin small letter i with diaeresisLatin-1 Supplement
ð2402400xF0U+00F0&eth;Latin small letter ethLatin-1 Supplement
ñ2412410xF1U+00F1&ntilde;Latin small letter n with tildeLatin-1 Supplement
ò2422420xF2U+00F2&ograve;Latin small letter o with graveLatin-1 Supplement
ó2432430xF3U+00F3&oacute;Latin small letter o with acuteLatin-1 Supplement
ô2442440xF4U+00F4&ocirc;Latin small letter o with circumflex Latin-1 Supplement
õ2452450xF5U+00F5&otilde;Latin small letter o with tildeLatin-1 Supplement
ö2462460xF6U+00F6&ouml;Latin small letter o with diaeresisLatin-1 Supplement
÷2472470xF7U+00F7&divide;division signLatin-1 Supplement
ø2482480xF8U+00F8&oslash;Latin small letter o with strokeLatin-1 Supplement
ù2492490xF9U+00F9&ugrave;Latin small letter u with graveLatin-1 Supplement
ú2502500xFAU+00FA&uacute;Latin small letter u with acuteLatin-1 Supplement
û2512510xFBU+00FB&ucirc;Latin small letter with circumflexLatin-1 Supplement
ü2522520xFCU+00FC&uuml;Latin small letter u with diaeresisLatin-1 Supplement
ý2532530xFDU+00FD&yacute;Latin small letter y with acuteLatin-1 Supplement
þ2542540xFEU+00FE&thorn;Latin small letter thornLatin-1 Supplement
ÿ2552550xFFU+00FF&yuml;Latin small letter y with diaeresisLatin-1 Supplement


Problems with non-Latin scripts

If you use the Arabic, Greek, Hebrew, Russian or Thai versions of Microsoft Windows to view a file that uses Latin script and includes accented characters, then the accented characters may be replaced or omitted. For example:

ANSI characters with US Windows

US Windows
ANSI characters with Russian Windows

Russian Windows
ANSI characters with Thai Windows

Thai Windows

This happens because the characters for these non-Latin scripts are coded to the same numbers as the accented Latin characters in the ANSI character set; this problem will be resolved when Unicode becomes more widely used, because it provides a unique numeric identifier for each character.



--
ఇట్లు మీ,
చంద్రశేఖర్.

Limit the Number of Characters in a Textarea or Text Field

Step 1 - Create Function

Insert the following code into the page head:

<script language="javascript" type="text/javascript">
function limitText(limitField, limitCount, limitNum) {
if (limitField.value.length > limitNum) {
limitField.value = limitField.value.substring(0, limitNum);
} else {
limitCount.value = limitNum - limitField.value.length;
}
}
</script>

Step 2 - Create Text Area

Use the following code to create the form and text area (if necessary, change the name of the form and text area to suit your needs):

<form name="myform">
<textarea name="limitedtextarea" onKeyDown="limitText(this.form.limitedtextarea,this.form.countdown,100);"
onKeyUp="limitText(this.form.limitedtextarea,this.form.countdown,100);">
</textarea><br>
<font size="1">(Maximum characters: 100)<br>
You have <input readonly type="text" name="countdown" size="3" value="100"> characters left.</font>
</form>

To create a single-line text field instead of a text area, use the following code:

<form name="myform">
<input name="limitedtextfield" type="text" onKeyDown="limitText(this.form.limitedtextfield,this.form.countdown,15);"
onKeyUp="limitText(this.form.limitedtextfield,this.form.countdown,15);" maxlength="15"><br>
<font size="1">(Maximum characters: 15)<br>
You have <input readonly type="text" name="countdown" size="3" value="15"> characters left.</font>
</form>


--
ఇట్లు మీ,
చంద్రశేఖర్.