In Your Eyes

Simple HTML Form Validation

February 23, 2008 · 4 Comments

I have a simple javascript code to perform simple HTML form validation. This validation can only check whether the elements, that types are textbox, textarea and password in the form is empty or not.

Just follow the naming standard for each error label id.
For example:

<span style="visibility:hidden;" id="frm_simple_lblError0" class="Error">*</span>

The id attribute in the code above means:

  • frm_simple is the id of the HTML form which will be validated.
  • lblError0 is the error label id for the first textbox or textarea or password in the form.

In summary, frm_simple_lblError0 means an error label id for first textbox or textarea or password in the form with frm_simple as id.

Dont forget to add this code on the onsubmit event inside the form declaration.
For example:

<form name="frm_simple" onsubmit="return checkForm(frm_simple)" method="POST">

Of course you can customize (using others naming standard) or even enhance the code.

This is the complete code. (more…)

Categories: Code

Penyakit Tipes (Typhus)

February 23, 2008 · 15 Comments

Sekedar berbagi informasi, semoga berguna.

Penyakit tipes (typhus) merupakan penyebab utama infeksi usus pada manusia dan hewan. Setiap tahun diseluruh dunia terdapat sekitar 17.000.000 kasus dengan 600.000 kematian. Jika tidak segera diobati, 10-20% penderita penyakit tersebut dapat berakibat fatal. Sekitar 2% dari penderita menjadi carrier (pembawa).

Penyebab: Bakteri Salmonella diantaranya yang dikenal adalah Samonella Typhi dan Parathypi.

Masa tunas: 1-2 minggu.

Gejala-gejala (more…)

Categories: Uncategorized