Automatic ajax call using jQuery

Total used files : index.php jquery.js random.php I am using jQuery’s setInterval() method to automatically make the ajax call in every 2 seconds. index.php [sourcecode language=”php” highlight=”11,13,17″] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Refresh Page itself</title> <script type="text/javascript" src="jquery.js"></script> <script> $(document).ready(function(){ var callAjax = function(){ $.ajax({ method:’get’, url:’random.php’, success:function(data){ $("#sample").html(data); } }); … Continue reading “Automatic ajax call using jQuery”

Drupal Logo

[Solved] Add module to admin/config page in Drupal7

We are going to create a following custom block in admin/config page. To create a block in admin/config like those ‘People, Content Authoring, Media’ etc. We need to define two menu items as shown below [sourcecode language=”php” highlight=”3,13″]function products_menu() { $items = array(); $items[‘admin/config/products’] = array( ‘title’ => ‘Configure Products’, ‘description’ => ‘Allows administrators to … Continue reading “[Solved] Add module to admin/config page in Drupal7”

[Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

Xampp is my favourite webserver for linux as well as windows for web development works. And while importing huge mysql database dumps I use the commandline tool in windows as well as linux. And I often find myself so irritating to the error messages as follows : ERROR 2002 (HY000): Can’t connect to local MySQL … Continue reading “[Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)”

How to install TweetDeck in Natty Narwhal (Ubuntu11.04)

Tweetdeck requires to have adobe air pre-installed. Visit my previous article http://www.samundra.com.np/how-to-install-tweetdeck-in-natty-narwhal-ubuntu-11-04/553 To install Adobe Air If you have already installed Adobe Air, You can skip the above step 1. At first visit the website : http://www.tweetdeck.com/desktop/ There you’ll see a Download Button at the bottom right corner. (see the screenshot below). Click “Download now” … Continue reading “How to install TweetDeck in Natty Narwhal (Ubuntu11.04)”

How to install Adobe Air in Natty Narwhal (Ubuntu 11.04)

To install TweetDeck first we need to install the Adobe Air To install adobe air visit the following site. http://get.adobe.com/air/ From The Selection Combo Box select .deb (see the screenshot below – step1.png) After that you will get a Download now button Click on that button. Then you will have a installer file adobeair.deb Double … Continue reading “How to install Adobe Air in Natty Narwhal (Ubuntu 11.04)”