Top Menu

Category Archives Jquery

To crop and upload an image with jQuery and PHP, you can follow these general steps: Use a jQuery plugin like "Jcrop" to allow the user to select a crop area on the image. When the user has selected the crop area, retrieve the coordinates of the crop area using JavaScript. Send the coordinates to a PHP script on the…

 Add search to your site  Once you've created your custom search engine, you can add the Custom Search element to your site so that visitors can use it. To do this, you'll need to copy some code and paste it into your site's HTML where you want your search engine to appear.<form method="get" action="GoogleSearch.htm" target="_top">    <table border="0" align="right" cellpadding="0" cellspacing="0">       …

Recently when working on my site i got a requirment wherein i user can add multiple input text on page in different textboxes, and these textboxes needs to be created dynamically as per user need. So i decided to do it in jQuery. it’s quite easy to add or remove a textbox dynamically. The idea is quite simple, just combine…

Learn how to use the PHP GD library in your PHP program to generate dynamic images. Learn how to create and manipulate the GIF, PNG and JPG images.<?php# Note: Install GD laibreries $filename = '194_card.jpg';//orignal file $filename1 = '1.png';//save file name whoes you save list($current_width, $current_height) = getimagesize($filename);$left = 0; //crop left margin$top = 0;//crop right margin$crop_width = 1056; $crop_height = 400;$canvas = imagecreatetruecolor($crop_width,…

How can import excel file data in mysql with the help of php. To import excel data into php-mysql records first create a table with required fields. Make database connection. Open excel file and read columns one by one and store in variables.First Method******************* import excel data to php code****************/$handle = fopen("Book1.csv", "r");while (($data = fgetcsv($handle)) !== FALSE) { $num…

file upload with progress barjquery upload file with progress barStep 1.<html><head><title>Image upload without refresh page</title></head><scripttype="text/javascript"src="scripts/jquery.min.js"></script>//search this file on google <scripttype="text/javascript"src="scripts/jquery.form.js"></script> //search this file on google<scripttype="text/javascript">$(document).ready(function() { $('#photoimg').live('change', function(){ $("#preview").html(''); $("#preview").html('<img src="loader.gif" alt="Uploading...."/>'); //download load loading image  $("#imageform").ajaxForm({ target: '#preview' }).submit(); }); }); </script><style>body{font-family:arial;}.preview{width:200px;border:solid 1px #dedede;padding:10px;}#preview{color:#cc0000;font-size:12px}</style><body><divstyle="width:600px"><formid="imageform"method="post"enctype="multipart/form-data"action='ajaximage.php'>Upload your image <inputtype="file"name="photoimg"id="photoimg"/><br><inputtype="text"id='tt'name='tt'></form><divid='preview'></div></div></body></html>Step 2. <?php$path = "img/"; // set image upload path $valid_formats = array(".jpg", ".png",…

Some time clients requirement that when I right click then open delete option and particular div delete<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style>.vmenu { border:1px solid #aaa; position:absolute; background:#fff; display:none; font-size:0.75em;}.vmenu .first_li span { width:100px; display:block; padding:5px 10px; cursor:pointer}.vmenu .inner_li { display:none; margin-left:120px; position:absolute; border:1px solid #aaa; border-left:1px solid…

Pagination ClassCodeIgniter's Pagination class is very easy to use, and it is 100% customizable, either dynamically or via stored preferences.Here we will tell create paging in codeignator.Create Model class modelname extends CI_Model{function __construct()    {        parent::__construct();        $this->load->database();    }function get_all_posts($limit, $offset)    {        //get all entry        $query = $this->db->get('entry', $limit, $offset);;/****entry is table name *******/        return $query->result();    }}Controller class controllername extends CI_Controller{      function…

How can change div, span etc position   randomly ?<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Welcome to Notizza</title><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script><style>.tip1 { width:44px; height:30px; vertical-align:middle; text-align:center; font-weight:bold; color:#222; line-height:30px; padding-right:6px; background:url(../images/bubble1.png) 0 0 no-repeat; z-index:100; margin-top:5px;}.toolTip { position: relative; }.toolTip a { text-decoration: none; text-align: center;}.toolTip .alt { display: none;}.toolTip a:hover ~ .alt { display: inline; padding: 6px; margin:…

Close