Tuesday, April 3, 2007

Validating Numeric Values in Textbox in Forms

This is one of those "non-Oracle" posts, I would be dropping here once in a while.

Suppose you have a HTML form and the form has a text box, in which you want user to only enter numeric value. In order to validate the numeric value you may use the javascript's isNan() function. isNan() function checks that if its argument is Not a Number, if it is not, then it returns true otherwise it returns true.

Lets have a running example to depict this concept.


function validateform(x)
{
if (isNaN(x.txtiprice.value))
{
alert('Kindly enter number in price.');
x.txtiprice.focus(); return false;
}
}



form id="frmCheckout" name="frmCheckout" onsubmit="return validateform(this);"

input id="txtiprice" maxlength="50" size="30" name="txtiprice"
inputname="btn" id="btn" value="Submit" type="submit"

/form





We have defined a funciton "validateform()" at the top and then have called it whenever the form "frmcheckout" will be submitted. In the validateform() function, the condion checks that if the value submitted in txtiprice text box is number or not and then return true or false.

Sunday, April 1, 2007

Where is my 10g DBA Course, Miss OU?

Oracle is a great company having a great product like Oracle Server. But Oracle University (OU) is on the other side of extreme, atleast in Pakistan. I dont know whether it has to do anything with the "Developing nation" tag upon Pakistan or its a sheer negligence, but I am sure the affairs of OU in Pakistan are in a ver abysmal state, to say the least.

I encountered OU in the summer of 2003, when I attended a Oracle 9i DBA track course there. It was royally pathetic and royally expensive. The teacher did'nt know the difference between the instance and database. It was run under the umbrella of some company called as Techno-ed. Nowadays, Ora Tech, is arranging the courses for OU.

The company has changed, but the state of affairs remains as dismal as before. I have been trying to attend Oracle 10g DBA track course for the last 6 months or so, but there is no reasonable and satisfactory response from Ora Tech or Oracle University. I have contacted myriad number of times to OU Islamabad, OU Karachi and Ora Tech Islamabad, and all show me the rosy picture that course will start very soon and they will send me the schedule promplty.

There is still no course in the offing. OU, Karachi has again, upon my inquiry, bestowed the information that course will *Surely* start in the mid of April. One could only hope. Does Oracle Corporation in US, monitors these "Developing" OUs or she just counts the money?