Saturday, October 6, 2012

Writing Object-Oriented JavaScript

Introduction

ASP.NET and Visual Studio 7.0 are making important contributions to the improvement of the web development experience. Unfortunately, there is also a tendency created among developers to limit their interaction with JavaScript. Clearly JavaScript is valuable for adding client-side functionality to web pages. However ASP.NET programming models suggest that developers produce page layout while emitting client-side JavaScript from ASP.NET controls. As a consequence, this model tends to limit JavaScript to procedural adjuncts. This is rather unfortunate because it severely limits the power of an object-oriented scripting language that developers can use to write rich and reusable client-side components.

Source: http://www.codeproject.com/Articles/5608/Writing-Object-Oriented-JavaScript-Part-1 
Another Source: http://mckoss.com/jscript/object.htm

Thursday, September 20, 2012

Date Drop Down Lists

This JQuery plugin converts a textfield with date value into a set of drop down lists for day, month and year.

Demo

When applied, the original textfield is replaced by a set of drop down lists, but it's value can still be referenced by the original ID:

Source: http://www.amdonnelly.co.uk/experiments/date-drop-down-lists.aspx

Friday, September 14, 2012

JQWidgets - Unique toolkit for HTML5 Web development

jQWidgets gives us something new and special. It’s a new and unique library for Web development and unlike others it makes our Apps and Websites look beautiful on desktops, touch devices and mobile phones.
jQWidgets is the ultimate UI toolkit for the next generation of cloud apps development and it is built entirely on open standards and technologies like HTML5, CSS, JavaScript and jQuery.

jQWidgets brings broad platform and device coverage with minimum development cost. It is tested with many browsers and optimized to work well on popular phones and tablet devices as well as on PCs.

Source: http://www.jqwidgets.com/

Tuesday, September 4, 2012

Jquery Tutorial : Dom Manipulation

3. DOM And Attributes Manipulation

  • To provide interaction on a page you want to be able manipulate elements dynamically.
  • In this chapter, you are going to learn how to dynamically:
    • Create elements on the page
    • Insert existing or freshly created elements on the page
    • Move elements to a different location on the page
    • Clone elements
    • Remove elements
    • Replace elements
  • From a selection of elements, you will be able to get and/or set their attribute values.

3.1. DOM Manipulation

Tuesday, July 3, 2012

HybridAuth, open source social sign on php library

HybridAuth, open source social sign on php library

HybridAuth enable developers to easily build social applications to engage websites vistors and customers on a social level by implementing social signin, social sharing, users profiles, friends list, activities stream, status updates and more.
HybridAuth goal is to act as an abstract api between your application and various social apis and identities providers such as Facebook, Twitter, MySpace and Google.

Source: http://hybridauth.sourceforge.net/index.html

Tuesday, June 19, 2012

Drag and drop table content/rows with JavaScript

Source: http://www.redips.net/my/preview/REDIPS_drag/



Content of HTML table cells can be dragged to another table cell or another table. It isn't difficult to define onMouseMove handler and change top / left element styles to move the object. In case with tables, you will have to determine somehow destination table cell. Attaching onMouseOver handler on table cells will not work, because browser doesn't fire events to the elements beneath the dragged object.
Anyway, after taking care of the current scroll position and calculating table cells positions, here is example that should work in FF3, IE8, Google Chrome, Safari 5 and Opera 11. Please try to drag green, blue or orange bordered DIV elements, change properties (radio button and check-boxes) and click on "Save" button.
Version 4.6.18
Download redips2.tar.gz
You can not drop here
Drag
and
drop
content
with
JavaScript
Smile
Table2
and
Drag
drop
table
with
JavaScript
Table3
Clone
(1) Clone
(2) Clone
Trash
Save content of the first table (plain query string)
Save content of the first table (JSON format)
Enable dropping to already taken table cells
Disable dropping to already taken table cells
Switch content
Switching content continuously
Overwrite content
Remove cloned object if dragged outside of any table
Delete confirmation
Enable dragging
"Save" button will scan tables, create query string and send to the PHP page. Demo shows how to collect table content and accept parameters on the server side. More about accepting parameters you can read in my post Reading multiple parameters in PHP."Clone" elements (orange in this demo) will be duplicated first because of "clone" keyword contained in class name. If you drop object on cell named "Trash", object will be deleted from the table (with or without confirmation). Script has built in autoscroll and option to forbid landing to non empty cells or cells named with class "forbid". Table can contain rowspan / colspan cells and different background color for every cell.
Here are minimal steps to enable content dragging in table:
  • put to the head section
  • initialize REDIPS.drag library:
  • place table(s) inside
    to enable content dragging
  • place
    Hello World
    to the table cell
Other features of redips-drag.js:
  • functions and data structure are defined in namespace (easier integration with other JS frameworks)
  • JSLint: No problems found in redips-drag.js (tough one, huh)
  • REDIPS.drag documentation generated with JsDoc Toolkit
  • drag and drop table rows
  • movable div element can contain form elements, images and links
  • forbidding or allowing table cells marked with class name "mark" (depends on "marked_cell" parameter)
  • option to define exceptions and allow certain DIV elements to the marked table cell
  • option to define single content cell on the table declared with "multiple" drop option
  • cloning
    • for unlimited cloning add "clone" class name to the div object
      Hello World
    • to limit cloning and transform last object to the ordinary movable object add 'climit1_X' class name
      Hello World
    • to limit cloning and transform last object to immovable object add 'climit2_X' class name
      Hello World
    • where X is integer and defines number of cloned elements (in previous examples, each climit will allow only 4 cloned elements)
  • unlimited nested tables support
  • dropping objects only to empty cells
  • switch table content
  • switching content continuously
  • overwrite table cell content with dropped element
  • shift table content
  • table cell with "trash" class name becomes trashcan
  • enabled handlers to place custom code on events: clicked, moved, not moved, dropped, switched, changed, cloned, cloned end1, cloned end2, not cloned, deleted and undeleted
  • deleting cloned div if the cloned div is dragged outside of any table
  • enabling / disabling dragging
  • animation (move element/row to the destination cell/row)
  • added support for touch devices (touchstart, touchmove, touchend)
How redips-drag.js works?
Script will search for div elements (with class name "drag") inside tables closed in
and attach onMouseDown event handler. When user clicks with left mouse button on div element, onMouseMove and onMouseUp handlers will be attached to the document level.
While dragging div element, script changes "left" and "top" styles of the object. This is function of the onMouseMove handler. When user releases left mouse button, onMouseUp event handler will unlink onMouseMove and onMouseUp event handlers. This way, browser will listen and process mousemove events only when user holds left mouse button on div element.
As I mentioned, onMouseDown is defined on the elements you want to drag. Elements beneath the dragged object will not be able to catch onMouseOver event. Why? Because you are dragging object and that object only can catch the onMouseOver event.
So, to detect destination table cells, script calculates all table cell coordinates (with scroll page offset) and store them to arrays. Arrays are searched inside onMouseMove handler and after left mouse button is released, object will drop to the current (highlighted) table cell.
In redips2.tar.gz (130KB) package you will find 24 examples including example of how to save/recall table using PHP and MySQL. Package also contains and redips-drag-min.js, a compressed version of REDIPS.drag library.
Happy dragging and dropping!

Thursday, May 24, 2012

Free Download Jquery FullCalendar

FullCalendar is a jQuery plugin that provides a full-sized, drag & drop calendar like the one below. It uses AJAX to fetch events on-the-fly for each month and is easily configured to use your own feed format (an extension is provided for Google Calendar). It is visually customizable and exposes hooks for user-triggered events (like clicking or dragging an event). It is open source and dual licensed under the MIT or GPL Version 2 licenses.

Souce: http://arshaw.com/fullcalendar/

Wednesday, April 4, 2012

Galleria - JavaScript image gallery framework


Galleria is a JavaScript image gallery framework built on top of the jQuery library. The aim is to simplify the process of creating professional image galleries for the web and mobile devices.

Free without restrictions
Galleria and the “classic” theme is open source and released under the MIT license with basically no restrictions whatsoever.

No programming skills required

Just copy/paste a few lines of code, add some photos and pop a fully featured gallery in your browser.

Flickr & Picasa ready

Pull galleries and sets from Flickr or Picasa into a Galleria gallery with just one line of code.

Scaling & thumbnails on the fly

Galleria uses canvas and other techniques to create thumbnails and scale images on the fly, great when trying different sizes and themes without opening photoshop.

iPhone, iPad & touch support

Galleria supports swipe movements and uses hardware optimized animations for ultra-smooth image browsing on mobile and touch devices.

One core, multiple themes

Galleria exposes a great set of tools to create tailored themes for your project. Or you can browse through our Premium themes and see if something fits.



Sourcehttp://galleria.io/

Thursday, March 29, 2012

30 Amazing jQuery Tables

Most of the developers today use div instead of table to display data on web pages to offer more a flexible and customisable look and feel. That’s why we’re here to give you all of the best jQuery html table plugins for you to use to display, manage and sort your data with minimal effort. Enjoy!
Related posts:

1. DataTables

This is a powerful jQuery table plugin that has a lot of features.
jQuery-DataTables.jpg
Source

2. uiTableFilter

Filter table rows using this wonderful jQuery plugin.
jQuery-uiTableFilter.jpg
Source

3. Tablesorter

Turn a standard HTML table using thead and tbody tags into a sortable table without refreshing a page.
jQuery-Tablesorter.jpg
Source

Source Link: http://www.jquery4u.com/plugins/30-amazing-jquery-tables/

Wednesday, March 21, 2012

JavaScript Modal Windows – TinyBox2


JavaScript Modal Windows
This update to the TinyBox modal box script brings a ton of new features and still clocks in under 5KB. The script now supports iframes and images natively. You can POST with Ajax. Clicking ESC will close the window. Callback functions can be passed for load and close events. You can set CSS IDs to override the default styling. CSS position can be toggled between fixed and absolute. The mask opacity can be sent. You have full control over window location. And of course there is now a close button out of the box you can toggle.
The script is now executed by passing an object due to the large number of options. There is nothing to initialize, just call the function on whatever mouse or browser event you like. A sample call would look like the following:
1
TINY.box.show({url:'advanced.html',width:300,height:150})
Parameters include (tag – description (type) – default):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
html - HTML content for window (string) - false
iframe - URL for embedded iframe (string) - false
url - path for AJAX call (string) - false
post - post variable string, used in conjunction with url (string) - false
image - image path (string) - false
width - preset width (int) - false
height - preset height (int) - false
animate - toggle animation (bool) - true
close - toggle close button (bool) - true
openjs - generic function executed on open (string) - null
closejs - generic function executed on close (string) - null
autohide - number of seconds to wait until auto-hiding (int) - false
boxid - ID of box div for style overriding purposes (string) - ''
maskid - ID of mask div for style overriding purposes (string) - ''
fixed - toggle fixed position vs static (bool) - true
opacity - set the opacity of the mask from 0-100 (int) - 70
mask - toggle mask display (bool) - true
top - absolute pixels from top (int) - null
left - absolute pixels from left (int) - null
topsplit - 1/x where x is the denominator in the split from the top (int) - 2
Nearly all of the parameters above are optional. Of course you must include either the html, iframe, url, or image parameters as they drive the content. Height and width are option and will be calculated based on offsetWidth and offsetHeight in the case of HTML or Ajax content else by actual width and height with images. Iframe calls must include a height and width. By default the box will animate in the center of the screen in a fixed position.


Source linkhttp://www.scriptiny.com/2011/03/javascript-modal-windows/

Monday, January 23, 2012

KoolPHPSuite Version 62 released on


KoolPHPSuite KoolPHPSuite Version 62 released on 01/14/2012

KoolPHPSuite contains a group of great UI controls to build Excellent Web 2.0 Application: Ajax FrameWork, TreeView, SlideMenu, AutoComplete and many more... View and Download NOW!