Posts

Showing posts from 2014

Make Check Box And Selected Option Checked in PHP

Make multiple check box and selected option checked in php according database value. Make Selectbox checked :- SQL Query :- $GetCuisines = mysqli_query($obj->mysqli,"SELECT CuisineID,CuisineName,CuisinePic from contribu_yummy.cuisine where active=1 and deleted=0"); <select name="SelCuisineID" id="SelCuisineID" class="form-control" style="width:230px">     <option value="" class="Text" >Select</option>     <?php     while($cuisineRow = mysqli_fetch_array($GetCuisines))     {         if($CuisineID == $cuisineRow['CuisineID'])         {             $checkedCuisine = "selected='selected'";         }         else         {          ...

Most Popular Knowledgeable Websites For Indian

Lets gone those days when we are not able to get more knowledge and we depends upon others peoples. Now these days Internet reachable for every one easily even we can access internet on mobile. Here are some most popular knowledgeable websites Educational Websites :- 1. http://www.w3.org/ 2. http://www.w3schools.com/ 3. https://www. wikipedia . org/ 4.  http://www.computerhope.com/ 5.  http://www.gktoday.in/ 6.  http://www.sakshat.ac.in/ 7. http://www.tutorialspoint.com/ 8. http://www.elearn99.com/ Online Searching Websites :- 1. http://www.google.com/ 2. http://www.bing.com/ 3. http://www.aol.com/ Online Data Storage Websites :- 1. http://www.drive.google.com/ 2. http://www.adrive.com/ 3. https://www.dropbox.com/ 4. https://www.onedrive.live.com/ 5. https://www.copy.com/ Online Language Learning Websites :- 1. http://www.fis.edu/ 2. http://www.livemocha.com/ 3. https://www.busuu.com/enc/ Online Library Websites :- 1. https://www.quest...

Add Event in Google Calendar Using Javascript

Add Event in Google Calendar Using Javascript with google authentication. More information visit on https://developers.google.com/google-apps/calendar/ <a href="javascript:void(0)" class="addEvent-button" id="addEvent-button"  onclick="addEventOnClick('<?php echo htmlentities($array); ?>');"><img src="img/gcalendar.png" title="Add to google calendar" style="height:24px !important;width:24px !important;"></a> <script type="text/javascript">     var clientId = 'CLIENTID';     var apiKey = 'APP KEY';     var scopes = 'https://www.googleapis.com/auth/calendar';     // Oauth2 functions     function handleClientLoad() {         gapi.client.setApiKey(apiKey);     }         function addEventOnClick(data)     {         gapi.auth.authorize({client_id: clientId, s...

Share on Social Sites using javascript Popup

Share on Social Sites using javascript Popup on click Share Image includes whatsapp. Share Sites Metatags. Share with image on facebook, google plus, twitter. <html> <head>     <title>Share in Social Sites</title>     <!-- Twitter Meta Tags -->     <meta name="twitter:card" content="summary"/>     <meta name="twitter:site" content="www.domain.com"/>     <meta name="twitter:title" content="Title Here">     <meta name="twitter:description" content="Description here"/>     <meta name="twitter:creator" content="Creater name"/>     <meta name="twitter:image" content="Full image path here"/>     <meta name="twitter:domain" content="domain.com"/>         <!-- Google Plus Meta Tags-->     <meta itemprop="name" content="do...

Import Hotmail Contacts using Javascript

Import Hotmail Contacts using Javascript For more information visit http://support.loginradius.com/hc/en-us/articles/201625646-How-do-I-create-a-MSN-Hotmail-Live-app- Example:- <!DOCTYPE html> <html>     <head>         <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>         <!--WL Library For Hotmail API-->         <script src="//js.live.net/v5.0/wl.js"></script> </head> <script>     var APP_CLIENT_ID = "000000004812A421";     var REDIRECT_URL = "http://xyz.com/index/import";     var CLIENT_SECRET = "c86m2XYZXaIG9CjTsbpQdvbIuR7vaaDl";     WL.init({               client_id: APP_CLIENT_ID,             ...

Import Gmail Contacts using Javascript

Import Gmail Contacts using Javascript More Information visit: https://developers.google.com/google-apps/contacts/v3/ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript"> var clientId = '**32959*****-vg5vrmb58urppmg5lv40hp8p2kn7bhl6.apps.googleusercontent.com'; var apiKey = '*******qijwlBuWfkjgF15MQ67fqRzC7*******'; var scopes = 'https://www.google.com/m8/feeds'; var emailList; $(document).on("click",".js-google_contacts", function(){    gapi.client.setApiKey(apiKey);    window.setTimeout(checkAuth,3); }); function checkAuth() {      gapi.auth.authorize({client_id: clientId, scope: scopes, immediate: false}, handleAuthResult); } function handleAuthResult(authResult) {   if (authResult && !authResult.error) {     $.get("https://www.google.com/m8/feeds/contacts/default/full?alt=json&access_token=" + authResult.acc...

Login With Google Plus Using Javascript

Login With Google Plus Using Javascript More information visit: https://developers.google.com/+/web/api/javascript <!-- Place this asynchronous JavaScript just before your </body> tag --- Google SignIn--> <script type="text/javascript">     (function() {            var po = document.createElement('script'); po.type = 'text/javascript';            po.async = true;            po.src = 'https://apis.google.com/js/client.js?onload=onLoadCallback';            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);          })(); </script> <script type="text/javascript"> $(document).ready(function(e) {            var po = doc...

Login with Linkedin Using Javascript

Login with Linkedin Using Javascript For more information visit: http://developers.linkedin.com/documents/getting-started-javascript-api <!--Script for LinkedIn Login add in head --> <script type="text/javascript" src="https://platform.linkedin.com/in.js">       api_key: 75dtnfjj******       authorize: true       lang:  en_US </script> <script type="text/javascript"> // JavaScript Document function signupLinkedIn() {     IN.User.authorize(onLinkedInAuth);     if(IN.User.isAuthorized())     {         //DO STUFF         //console.log('welcome');     }     return false; }; function onLinkedInAuth() {    // we pass field selectors as a single parameter (array of strings)    IN.API.Profile("me")     .fields(["...

Login with Facebook Using Javascript

Login with Facebook using Javascript. For more information visit : https://developers.facebook.com/products/login/ <script> window.fbAsyncInit = function() {   FB.init({     appId      : '*************427',     cookie     : true,  // enable cookies to allow the server to access                         // the session     xfbml      : true,  // parse social plugins on this page     version    : 'v2.0' // use version 2.0   }); }; // Load the SDK asynchronously (function(d, s, id) {     var js, fjs = d.getElementsByTagName(s)[0];     if (d.getElementById(id)) return;     js = d.createElement(s); js.id = id;     js.src = "//connect...

Google Autocomplete API Search Places and Directions

Image
Find direction and places using google map api using with bootstrap tab. Load map in bootstrap tab. DEMO

Create CSV File In PHP Using Database Query

This is simple way to Create CSV File In PHP Using Database Query. If you want to create file dynamically. This code is helpfull for you. <?php $con =  new mysqli('127.0.0.1','root','pinturp1','usedb'); if ($con->connect_error) {     die("Connection failed: " . $con->connect_error); } $sql = "SELECT id,fname,lname,gender FROM test"; $result = $con->query($sql); $OutputBuffer = ""; $ExportDestinationPathWebServer = $_SERVER['DOCUMENT_ROOT'].'/pintu/uploads'; $inpFileName = "test.csv"; $OutputBuffer = "Unique ID,First Name,Last Name,Gender".CHR(13); /*If file already found delete it from directory*/ try {     if(file_exists($ExportDestinationPathWebServer.'/'.$inpFileName)) {         unlink($ExportDestinationPathWebServer.'/'.$inpFileName);     } } catch(Exception $e) {     echo $e->getMessage(); } $fh = fopen($ExportDestinationPathWebServer.'/'.$...

Get random records from mysql

Get random records from mysql. To get randon records for current day and for current year using by order by rand() function. <?php //Connect To database $Con=mysqli_connect("127.0.0.1","root","pinturp1","contribu_yummy"); //To get randon records $SQL="SELECT keyword FROM `contribu_yummy`.`keywords` ORDER BY RAND() LIMIT 5"; $Result = mysqli_query($Con,$SQL); while($row = mysqli_fetch_array($Result)) {   echo $row['keyword'];   echo "<br>"; } //To get randon record for current day $SQL="SELECT keyword FROM `contribu_yummy`.`keywords` ORDER BY RAND(".date('Ymd').") LIMIT 5"; $Result = mysqli_query($Con,$SQL); while($row = mysqli_fetch_array($Result)) {   echo $row['keyword'];   echo "<br>"; } //To get randon record for current month $SQL="SELECT keyword FROM `contribu_yummy`.`keywords` ORDER BY RAND(".date('Ym')....

Using same query again inside while loop in PHP

 Using same query again inside while loop in PHP  The mysqli_data_seek() function adjusts the result pointer to an arbitrary row in the result-set. <?php     $con = mysqli_connect('127.0.0.1','root','pinturp1','test');     $sql = "Select * from test.keywords limit 20";     $resultQuery = mysqli_query($con,$sql);     while($queryrow = mysqli_fetch_array($resultQuery))     {         echo $queryrow['keyword']."<br>";     }         echo "<br>-------------------------------------------<br>";     mysqli_data_seek($resultQuery, 0);     while($queryrow = mysqli_fetch_array($resultQuery))     {         echo $queryrow['keyword']."<br>";     }         echo "<br>--------------------------...

Write and read txt file and insert into database with coldfusion

Write and read txt file and insert into database with coldfusion, mysql and SQL Server <cfoutput>     <cfset HTTPUploadPath = "C:\ColdFusion10\cfusion\wwwroot\pintu\uploads\">     <cfset inpFileName = "test.txt">     <!---******** Start: text File Write Session ***************--->         <cfparam name="fileExists" default="Yes">     <!--- Get unique file name --->     <cfset FileCounter = 0>     <cfloop condition='fileExists eq "yes"'>         <cfif FileExists("#HTTPUploadPath##inpFileName#") is "Yes">             <cfset FileCounter = FileCounter + 1>             <cfset fileExists="yes">             <cfset inpFileName = "test#FileCounte...

Modify Custom Search Box

Image
This is cse generated Javascript Code <div style="width:250px;">     <script>       (function() {         var cx = '010787842564776071847:h_-fbbdfsvu';         var gcse = document.createElement('script');         gcse.type = 'text/javascript';         gcse.async = true;         gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +             '//www.google.com/cse/cse.js?cx=' + cx;         var s = document.getElementsByTagName('script')[0];         s.parentNode.insertBefore(gcse, s);       })();     </script>     <gcse:searchbox-only></...

Add and remove textbox dynamically using coldfusion and jquery

Image

installation and configuration Wamp server 2 on Windows 8

Image
Download free wamp server from official website from <a href="http://www.wampserver.com/en/">http://www.wampserver.com/en/</a> After Intalling click on Wampserver Short Cut Icon from Desktop. on task bar It shows green color icon it means all services started. Open browser and type localhost or 127.0.0.1 If it shows : ERROR Not Found HTTP Error 404. The requested resource is not found. Go to clicn on green icon - > Apache - >  httpd.conf Change Listen 80 to Listen 81 Open browser and type localhost:81 or 127.0.0.1:81 and if it shows : Forbidden You don't have permission to access / on this server. Then change to > listen 0.0.0.0:81 For phpmyadmin http://localhost:81/phpmyadmin Error MySQL said: Documentation #1045 - Access denied for user 'root'@'localhost' (using password: NO) phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, user...

Load div content on scroll using coldfusion

Scroll.cfm <cfsetting showdebugoutput="no"> <style> .loading{         display: block;         margin: 0px auto;         text-align: center;     } </style> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script> $(document).ready(function() {     var loading = false;     //initial track_load     var track_load = 1;     //a place for my crap     var loadContentDiv = $("#content");     //populate the initial content     loadContent(track_load);         $(window).scroll(function() { //detect page scroll                        if($(window).scrollTop() + $(window).height() == $(...

Upload file on select browse file event

Image
This is the example to show browse button on image on mouse over and remove then on mouse leave using css and javascript and upload file on select browse file event using Coldfusion,CSS and Jquery. After mouse over shows browse image button.

Query Alteration with Coldfusion using Query of Queries (QoQ)

Image
Using alteration in ColdFusion query we can be altered without effecting the identification of a cached query with QOQ. Original Query Output. After Alteration Query Output.

checkbox column on Server side processing and remember selected checkboxes and saving stage between pages

Image
Datatable serverside example following thease  1.Checkbox column on Server side processing  2.Remember selected checkboxes  3.Saving stage between pages  4.Get all the values of the checked checkboxes  5.Edit and Delete with serverside processing  6.Select All and UnSelect all checkboxes Screen 1 Screen 2