Cjax Framework


These Ajax Overlays are built in Cjax's framework API. All overalys takes one line code to produce and you may also specify settings such as color and width. You may supply the content/html directly or provide a URL to fetch the content.

Examples


PHP
<?php 

//Overlay #1
$ajax->click("#overlay_cache",$ajax->overlay("ajax.php?overlay/view_overlay",array(),true));


//Overlay #2
$settings['top'] = '150px'//how far from the top of the screen
$settings['left'] = '20%'//how far from the left of the scree
$settings['transparent'] = '60%'//transparency percentange
$settings['color'] = '#FF8040'//change color
$settings['click_close'] = true;// click anywhere on the screen to close the overlay
$ajax->click("#overlay_no_cache",$ajax->overlay("ajax.php?overlay/view_overlay",$settings));


//Overlay #3
$ajax->click("#overlay_content",$ajax->overlayContent("Hello World",array('top'=> '200px')));


//Overlay #4
$ajax->click("#overlay_dialog",$ajax->dialog("Hello World",'Dialog#1'));


?>

Try it



#1 triggers an ajax URL, and displays the response in the content area. The response is cached then the next time it is requested, it displays the response from the cached request, does not make a new request.
See overlay (using cache)

#2 Triggers an ajax URL and refreshes the content each time by making a new request. Also demonstrate how alternatively the content window can be positioned in certain parts of the screen, not necesarly in the middle. It is also possible to customize colors.
See overlay (no cache)

#3 Does not trigger a URL, the content is provided directly instead, and displayed, as simple as that.
See overlay content

#4 Show overlay dialog
See a formatted overlay dialog

Previous Topic:  Previous Class    ·   Top of Page   ·   Demos Home   ·  

CodeIgniter  ·  Copyright © 2006 - 2012  ·  Cjax