Getting elements by Class name using Javascript

April 20th, 2009 Posted in Web 2.0

If we need to get an HTML element object using javascript we will usually use the method document.getElementById(). But  Javascript libraries like Jquey, Mutools etc.. are providing functionalities for getting an element by its class name
Without using any of these advanced Javascript libraries we can build a small function like document.getElementByClassName for getting HTML [...]

» Read More

Run or Execute SQL file using PHP

February 8th, 2009 Posted in Open Source, Web 2.0

If we need to execute SQL script from PHP code we can either use the PHP exec() function with the normal MySQL commands or can insert using normal MySQL queries. In the first case we can directly import the .sql file using mysql import commands. The below PHP code will [...]

» Read More

Different ways to declare a Javascript Function

December 24th, 2008 Posted in Web 2.0

There are different ways to declare a Javascript function. Even though all of them are doing the same and valid there are differences on how they are handled in the background.
In the usual way of declaring a function the content of the function is compiled but not executed until we call the function and [...]

» Read More

JQuery UI dialog close

December 17th, 2008 Posted in Web 2.0

We have a lot of situations to close a JQuery UI dialog from the dialog itself other than using the default close button. But the fuction dailog(”close”) will not work from the iframe since JQuery doesn’t support cross-window operations.
I am loading a Jquery UI dialog and inside it an iframe to show a form. [...]

» Read More

PHP mail() Function in Ubuntu Linux

August 25th, 2008 Posted in Ubuntu, Web 2.0

It is very easy to send mail from PHP scripts. But for sending mails  from php we need the right configurations in php.ini and also need to configure the linux server for emails.
For sending emails from a PHP script we need to configure a SMTP server on ubuntu which will enable you to send mail [...]

» Read More
Page 3 of 4«1234»