background preloader

Ajax Upload; A file upload script with progress-bar, drag-and-drop.

Ajax Upload; A file upload script with progress-bar, drag-and-drop.

How To Do a CSS PopUp Without Opening a New Window Ever wonder how some people can get little CSS PopUp’s without opening an annoying window? I’ll explain how. One of its advantages is that it’s not blocked by blockers and you can place it wherever you like on your page. Please note that whenever I speak about a blanket, I’m referring to the transparent film that goes over the content to draw attention to the PopUp. Click Here For The Demo The CSS What this CSS does is position and style the general elements. The Javascript File Click Here To Download the CSSPopUp.js file. toggle(div_id) – This simply toggles the inserted div name from being displayed (display:block) to being hidden (display:none).blanket_size(popUpDivVar) – This resizes the blanket to fit the height of the page because there is not height=100% attribute. The HTML The HTML places two your two CSS elements with display being set to none by default. Using the attribute onclick in our <a> tags, we can call our function: popup(); to do everything we need. Related Posts

Upload and Resize an Image with PHP Are you looking for image upload and Resize PHP script. I had implemented a simple PHP script to re-sizing image into different dimensions. It's very useful to your web projects to save hosting space and bandwidth to reduce the original image to compressed size. Download Script PHP Code This script resize an Image into two 60px and 25px. <? && ($extension ! $width,$height); imagecopyresampled($tmp1,$src,0,0,0,0,$newwidth1,$newheight1, $width,$height); $filename = "images/". Extention PHP funtion Finds file extensions. function getExtension($str) { $i = strrpos($str,"."); if (! $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } Download Script

Drawing Routes onto MKMapView Using Unofficial Google Maps Directions API « iPhone/iPad geeks world As a startup you should use the great component named MKMapView that already exists in IPhone SDK since the version 3.0.0. It is so easy to implement some map related requirements with this useful component as long as you need to draw routes between two locations. Yes, the MkMapView component is great but if it would have got a directions support it should be a perfect piece of the SDK. You already know that the built-in Google Maps applications on IPhone has the directions support somehow but the feature lacks on the MKMapView component. To have the work done, two problems must be solved. Anyway, according to Google Mapki we could grab routing data between two locations by requesting the url below with a parameter set which are lean and mean. The parameters are self explaning saddr: Source location’s latitude and longtitude daddr: Destination location’s latitude and longtitude output: Passing the value ‘dragdir’ forces http response to be in json format (I guess)

Ajax Image Upload without Refreshing Page using Jquery. Are you looking for ajax file/image upload and preview without refreshing page using Jquery. I had implemented this ajax form submitting using jquery.form plugin and used Arun Shekar's image cropping PHP code for uploading images. Just five lines of JavaScript code, Using this you can upload files, image and videos. Download Script Live Demo Javascript Code$("#photoimg").live('change',function(){})- photoimg is the ID name of INPUT FILE tag and $('#imageform').ajaxForm() - imageform is the ID name of FORM. index.php Contains simple PHP and HTML code. <form id="imageform" method="post" enctype="multipart/form-data" action='ajaximage.php'> Upload image <input type="file" name="photoimg" id="photoimg" /></form> Sample database design for Users. Users Contains user details username, password, email, profile_image and profile_image_small etc. ajaximage.php Contains PHP code. <? db.php Database configuration file, modify username, password, database and base url values.

Drag and drop Page last changed today This article has been translated into French. Here's a simple accessible drag and drop script. This is a drag and drop element with position: absolute This is a drag and drop element with position: fixed When the '#' link in the example boxes is activated (either by tabbing to it and hitting Enter or by clicking on it) the element can be dragged by the arrow keys. Copy the dragDrop object you find below on this page. You should set two properties. keyHTML contains the HTML of the keyboard-accessible link that every draggable object needs. keySpeed gives the speed of the keyboard drag and drop, in pixels per keypress event. There are seven more properties, but they're all internal to the script. Copy this object to your page (and don't forget the addEventSimple and removeEventSimple functions). A drag and drop is a way of moving an element across the screen. (In theory the element could have position: relative, but this is almost never useful. default: return true; }

Cross Browser HTML5 Drag and Drop Updates: May 10, 2013: This article has been translated into Serbo-Croatian language by Anja Skrba from Webhostinggeeks.com.Feb 3, 2009: A bug in Webkit seems to be the culprit in the permissions form example below not working correctly in Safari 4. The code has been updated to work around this bug and the article below has been updated. Thanks to russbuelt for pointing this out.Feb 3, 2009: Apparently, an example made by Apple which I reported not working in Safari does work in Safari 4.0.4 for Mac OS X. Image Credit: Flickr user svartling HTML5 Drag and Drop has been talked about a lot lately, but it’s hard to find really useful information about implementing it across multiple browsers. When normal people see the author of the Compatibility Master Tables respond negatively to a web technology, they would probably assume it would be a good sign to stay away from it. However, I am not normal. So, I decided to find out for myself how bad HTML5 Drag and Drop really is. <! Voila! <! <!

Custom File Inputs with a Bit of jQuery | Viget Inspire File inputs are notorious for being a pain to style across all browsers. In the following image, you can see the difference between the default file inputs in the major browsers: That's pretty gross. I was surprised to see that even Chrome and Safari are different. For a recent project, the comp had a form to allow users to upload a photo, but the button was completely custom. What followed was some CSS trickery and a bit of jQuery to make the input a little more functional. Starting Simple Let's start by wrapping the file input in a span, and adding an additional span to hold the text for our custom button: <span class="file-wrapper"> <input type="file" name="photo" id="photo" /> <span class="button">Choose a Photo</span></span> Then, let’s add a little CSS to the wrapper span: While we are in the CSS, let’s just style our custom button: Choose a Photo Now, let’s deal with the actual input by absolutely positioning it and assigning it a height: Getting a Little Tricky Ohh, now that is fun!

AnyLink Drop Down Menu Note: Updated June 28th 11 to v2.3: Menu updated to work properly in popular mobile devices such as iPad/iPhone and Android tablets. Description: This is an extremely versatile drop down menu script for ordinary links on your page, including image links. It can be activated either onMouseover or onClick. Two different toggle methods- Each menu can be activated either Mouseover the anchor link, or Click instead. Note that if a drop down menu is set to be revealed onClick on the anchor, the link inside the anchor is naturally disabled. Enjoy taking regular links on your page to the next level with this script! Demo: (click to reveal) Directions Step 1: This script uses three external files. Step 2: Add the below code to the HEAD section of your page: Step 2: Having done the above, all that's left is setting up your link(s) so a menu drops down. Customization of the Drop Down Menu Contents The above represents the entire definition for a single drop down menu content. Initializing the Menu

Facebook Wall Script 3.0 with PHP and Jquery Facebook wall script with expanding URLs one of the popular post on 9lessons. It is just collaboration of my previous jquery articles. Recent days I received lots of requests from my readers that asked to me how to display old updates. So that I have decided to release new version with user control support. This script very easy to install few lines of code changes, take a quick look at following steps. Download Script Live Demo The download script contains three folders called includes,css and js with PHP files. includes -- functions.php -- db.php //Database connection js -- wall.js -- jquery.oembed.js -- jquery.min.js // 1.4.2 version css -- wall.css//Filesindex.php, load_messages.php, load_comments.php, message_ajax.php,comment_ajax.php, delete_message_ajax.php, delete_comment_ajax.php Sample database design for Facebook wall script. Step 1 You have to create following tables otherwise find out wall.sql and execute SQL queries. Step 2 MySQL database configuration settings. Step 3 <? <?

Tutorials, demos and projects in Ajax (XMLHTTPRequest) Programming A Short Tutorial on XMLHttpRequest() LG #123 By Bob Smith Introduction This tutorial will show you how to build a web page that responds to asynchronous events. In five simple exercises, we'll show you the core of an Asychronous JavaScript And XML (AJAX) application. What you should already know: You should be familiar with basic web page creation and have a general idea of the client/server nature of web page requests. Requirements for the examples: To do the exercises in this tutorial, you will need a browser with JavaScript enabled. Application Overview To illustrate the need for AJAX, let's consider a real-world example: we've built a telephone answering machine and we want the caller ID information to be presented on a web page, which we can view while we are at home or at work. (answering_machine -> syslog -> fifo -> Apache -> web_page) Getting Started In the first exercise, we are going to test the development environment by running a simple PHP application. Now, create a fifo in the same directory: mkfifo ajaxfifo <?

Related: