This blog will contain non-technical, fun and personal posts. All my technical posts will be posted on SMD's blog, http://www.smd.com.my. Looking forward to see you there! :-)

Script Type Or Language?

I’ve been asking myself, what is the difference between this tag:
<script language=”javascript”>
and this tag:
<script type=”text/javascript”>
After doing some googling, I found this documentation.
The “language” specifies the scripting language of the contents of this element. Its value is an identifier for the language, but since these identifiers are not standard, this attribute has been deprecated in favor [...]

PHP Loves JSON

JSON is a format for communication between the server-side (PHP, JSP, ASP, etc…) and the client-side (javascript). The magic of it is that the response from the server-side can be easily converted to an object via the use of the eval() function. eval() (can be “evil”) is a function that gives you the possibility to [...]

GoodBye alert()

I have been working with Javascript and AJAX quite a bit recently. I always used alert() to debug something. At least to know that the script was able to call the method or something.

saveBtn = dojo.widget.createWidget(”Button”, {caption: “Save Settings”}, dojo.byId(”saveBtn”));
alert(saveBtn.caption);

This is annoying & traditional way. I’m lazy to use Venkman. After doing some Googling about [...]

Var Or No Var

Over the past few weeks, I have been working with Dojo Toolkit. Dojo is a powerful javascript toolkit. In javascript, the var keyword is used to declare (or create) variables, but it is not required. What’s the difference between these two statements:
a. var x =17;
b. x = 17;
Short answer. Statement (a) is to create variable [...]