Tuesday, 12 February 2013

Google Custom Search Engine With Your Website

Easy 3 Steps to create a Google Custom Search Engine With Your Website

Type 1:

   1. Login with your Gmail account in the below link
                                  http://www.google.com/cse/

   2. Enter your Valid Website Name in SITE TO SEARCH text area and click CREATE BUTTON.

   3. Google will generate and produce a coding, copy that coding and paste it in to your website coding and now run your website in browser, your website will appear with GOOGLE CUSTOM SEARCH Engine bar..

Type 2:

<form id="searchbox" action="http://www.google.com/search">
<input type="hidden" name="cx" value="Replace Value provide by google CSE" /> 
<input type="hidden" name="cof" value="FORID:0" />
<input name="q" type="text" size="40" />
<input type="submit" name="sa" value="Search" />
<img src="http://www.google.com/coop/images/google_custom_search_smnar.gif" alt="Google Custom Search" />
</form>

Thank You,
If this posting useful then comment.

          

Reference Error: $ is Not Defined

Javascript Reference Error: $ is Not Defined:


        If you are using javascript in your php or html file then include JS file with the php or html page like below...

For php with codeigniter Framework:

 "<script type="text/javascript" src="<?php echo base_url(). 'public/jquery.js'; ?>"></script>"

For HTML:

 "<script type="text/javascript" src="public/jquery.js"></script>"

Thursday, 7 February 2013

INFORMATION SCHEMA

Find Column Name in MYSQL using INFORMATION_SCHEMA:

         Select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'tablename';

Monday, 14 January 2013

Jquery History


JQUERY HISTORY

Original author(s):         John Resig
Developer(s):                 jQuery Team
Initial release:               August 26, 2006
Stable release:              1.8.3 / November 13, 2012; 2 months ago[1]
Preview release:           1.9 RC1 / January 9, 2013; 5 days ago[2]
Development status: Active
Written in JavaScript
Size:                               32 KB zipped / 91.6 KB (production mode) / 252 KB (development mode)
Type:                             JavaScript library
License:                        MIT[3]
Website:                        http://jquery.com

Monday, 7 January 2013

JQUERY (Part-1)

              The jQuery library makes it easy to manipulate a page of HTML after it's displayed by the browser. It also provides tools that help you listen for a user to interact with your page, tools that help you create animations in your page, and tools that let you communicate with a server without reloading the page. We'll get to those in a bit. First, let's look at some jQuery basics, and at how we can use jQuery to perform its core functionality: getting some elements and doing something with them.

$(document).ready()

                Before you can safely use jQuery to do anything to your page, you need to ensure that the page is in a state where it's ready to be manipulated. With jQuery, we accomplish this by putting our code in a function, and then passing that function to $(document).ready(). As you can see here, the function we pass can just be an anonymous function.
 
                                     $( document ).ready(function() {
                                                         console.log( 'ready!' );
                                      });
 
                 This will run the function that we pass to .ready() once the document is ready. What's going on here? We're using $(document) to create a jQuery object from our page's document, and then calling the .ready() function on that object, passing it the function we want to execute.
 

Get some elements

                  The simplest thing we can do with jQuery is get some elements and do something with them. If you understand CSS selectors, getting some elements is very straightforward: you simply pass the appropriate selector to $().
 
                                         $( '#header' ); // select the element with an ID of 'header'
                                         $( 'li' );      // select all list items on the page
                                         $( 'ul li' );   // select list items that are in unordered lists
                                         $( '.person' ); // select all elements with a class of 'person'