Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

Why does jQuery or a DOM method could not find the element?

As script executed line by line, they are only executed when they are added into the DOM. The order matters. This mean the script cant find the element which written later below as it is not added into the DOM yet. Example:The result for first document.getElementById is null. However, there is value for the second…

How to POST an array of objects with $.ajax

Base on earlier post which I talk about JSON. Here is the application part. Imagine you have an array of objects from client side need post back to server side for processing. JSON.stringify can do the trick of sending the array back to server side. Remember to put it before sending it. Sample Illustration Below:

Converting An Object to String in JavaScript

There are three ways to convert an object to string in Javascript will be as below: Limitation to Usevalue.toString() can only be use when the value is not null or undefine.value+”” can only be use when the value is non empty string.String(value) this way looks like a function call which can be confusing especially to…