jQuery doesn’t fire onChange event on hidden fields by default

Changes in value of hidden input elements don’t automatically fire the .change() event. So, whenever you set the value of any hidden input element & want the change to be tracked, you explicitly have to tell jQuery to trigger change event on that hidden input element.

function changeStatus(statusValue) {
$('#status').val(statusValue).trigger('change');
}

…. and then …

$('#status').change(function(){
... Perform some function on change of value ...
})

Do you always refer w3schools.com? Then just checkout w3fools.com

Few days before I just thought of appearing for JQuery certification exam. So I visited w3schools certifications here @ [Reference: http://w3schools.com/cert/cert_jquery.asp]

I took a practice quiz which was very basic in my opinion and scored 100% :). Then I looked for the cost of the exam & found it as $95.00.

After clearing the practice quiz & checking out the cost, I just thought, would it worth spending $95.00 for this w3schools certification?

They say the exams are taken online and it’s up to me to get a employer or teacher to supervise and have there name on the certification as the supervisor to add to the credibility of the cert.

Ha Ha Ha!

Googling a bit on this I landed on to w3fools.com and said NO! just after going through complete page.

Wanna know why?
Just visit w3fools.com & you will get the answer.

[W3Schools.com is not affiliated with the W3C in any way.]

Changing CHARACTER SET From LATIN1 to UTF8 in MySQL

Default CHARACTER SET of a MySQL Database is “Latin1“. When a database is created using default CHARACTER SET in MySQL, all the tables & string columns when created inherit the default CHARACTER SET of the database.

Creating Database with default CHARACTER SET is fine if we plan to store data in English language only. But when you plan to have a Multilingual Support in your application default CHARACTER SET won’t work. When you try to store CHINESE or JAPANESE characters (in Column >> Table >> Database with Default CHARACTER SET) it will silently accept those characters & show them as question marks ?????? or some boxes [][][][][][][][]. Surely this will cause frustration all round.

After digging around, the best character set to use which i found is UTF8.
To set the CHARACTER SET for the server, the my.cfg/my.ini file has to be modified:

default-character-set=utf8

Unfortunately, once a database and their tables are defined as latin1, they remain as latin1 unless you run this for each database:

ALTER DATABASE MYDATABASE CHARSET=UTF8;

and for each table:
ALTER TABLE MYTABLE CHARSET=UTF8;

and for each varchar/char type column:
ALTER TABLE MYTABLE ALTER COLUMN MYCOL CHARSET=UTF8;

and go on repeating this infinite times …. 😦

This is rather tedious and boring, so there should be a better way. And that is to dump out the SQL files, change the CHARACTER SET and dump it back in.

TEXT & BLOB Type Storage Requirements in MySQL

Under “Storage Requirements for String Types in MyISAM”, there’s a table stating that BLOB and TEXT require L + 2 bytes of storage space,
where L “represents the actual length in bytes of a given string value”, and, according to the table, is less than 2^16 (65,536) [64 KBs].
Consequently, you can’t store more than that. MEDIUMTEXT will give you 16,777,215 bytes of storage, while LONGTEXT gives you just short of 4.3 billion bytes.

Different Maximum sizes for Text & Blob Type in My SQL are:

[TEXT TYPE]

TINYTEXT – 255 bytes
TEXT – 65535 bytes [64KBs]
MEDIUMTEXT – 16,777,215 bytes (2^24 – 1) [16MBs]
LONGTEXT – 4G bytes (2^32 – 1)

[BLOB TYPE]

TINYBLOB – 255 bytes
BLOB – 65535 bytes [64KBs]
MEDIUMBLOB – 16,777,215 bytes (2^24 – 1) [16MBs]
LONGBLOB – 4G bytes (2^32 – 1)

[Reference Link: http://dev.mysql.com/doc/refman/5.1/en/storage-requirements.html]

Enabling No Cache in Webpage

You could use this:

<META HTTP-EQUIV=”PRAGMA” CONTENT=”NO-CACHE”>

It instructs the browser not to cache the page. Also you may use <META HTTP-EQUIV=”REFRESH” CONTENT=”1;URL=http://www.yoururl.com”>
this forces the page to refresh after 1 second, which is annoying an I think can have a detrimental effect on search engine spiders.