Category Archives: Computers and Internet

jQuery .attr() and .prop()

In jQuery, you have to be careful to use .attr() and .prop(). .attr() Get the value of an attribute for the first element in the set of matched elements or set one or more attributes for every matched element. .prop() Get … Continue reading

Posted in Computers and Internet, Laravel, Uncategorized | Leave a comment

Fix JSON decoding syntax error

I got a long JSON string from DB, and try to decode the string using json_decode() in PHP, I get null, the empty object. But when I tested it in a JSON pretty page http://jsonprettyprint.com/, everything looks good. It’s no single/double-quotes … Continue reading

Posted in Computers and Internet, Laravel, Lumen, Uncategorized, Yii | Leave a comment

css: make checked checkbox label bold

In many case, we want to highlight the checked checkbox label, so user know it’s checked without mistake. If you know CSS syntax, it becomes very easy: In below case, we just want a certain check box (service, and network … Continue reading

Posted in Computers and Internet | Leave a comment

3 Autocomplete fields reuse same AJax call.

This is a typical customized request, which in one page, they want to enter same ticket number to search, and same time can search 3 fields, and do 3 different functions. So like below code showed, we reused same search … Continue reading

Posted in Computers and Internet | Leave a comment

2 steps Ajax calls in one autocomplete field

In our code, sometimes we need update drop down list depends on the content in another field entered. Below is an example to show how to use autocomplete field, after you selected the item, and triggered drop down list option … Continue reading

Posted in Computers and Internet, Uncategorized | Leave a comment

Return the number of elements in the jQuery object.

Before jQuery 1.8, we like use .size() to get array element count. But .size() method is deprecated as of jQuery 1.8. It’s better to use .length property instead. The reason is the .length property is public, and does not have … Continue reading

Posted in Computers and Internet | Leave a comment

Software Security Features

Security is paramount when developing applications for the web. The best way to achieve a truly secure web application is to build that application with security in mind from the start. Whatever which programming language you are using. As one … Continue reading

Posted in Computers and Internet | Leave a comment