API Documentation

JQuery/View/Helper/AjaxLink.php

Includes Classes 
category
ZendX
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
ZendX_JQuery
subpackage
View
version
$Id: AjaxLink.php 24187 2011-07-05 14:51:57Z matthew $
Classes
ZendX_JQuery_View_Helper_AjaxLink

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

ZendX_JQuery_View_Helper_AjaxLink

Extends from
Zend_View_Helper_HtmlElement
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
ZendX_JQuery
subpackage
View
uses
Zend_Json
Properties
$currentLinkCallbackId
Methods
ajaxLink
_determineRequestHandler

Description

jQuery Accordion Pane, goes with Accordion Container

Properties

$currentLinkCallbackId

 $currentLinkCallbackId = '1'

Static because multiple instances accross views of AjaxLink could reset the counter and a subcontainer because of this single private class variable seems too much overhead.

Details

visibility
private
default
1
final
false
static
true
staticvar
Integer

Methods

_determineRequestHandler

_determineRequestHandler( Array $options, Boolean $hasParams ) : String

Determine which request method (GET or POST) should be used.

Normally the request method is determined implicitly by the rule, if addiotional params are sent, POST, if not GET. You can overwrite this behaviiour by implicitly setting $options['method'] = "POST|GET";

Arguments
$options
Array
$hasParams
Boolean
Output
String
Details
visibility
protected
final
false
static
false

ajaxLink

ajaxLink( String $label, String $url, Array $options = null, Array $params = null ) : String

Create an anchor that enables ajax-based requests and handling of the response.

This helper creates links that make XmlHttpRequests to the server. It allows to inject the response into the DOM. Fancy effects going with the links can be enabled via simple callback shortnames. The functionality is mostly controlled by the $options array:

$options Key Behaviour ================================================================================= 'update' Update a container with the content fetched from $url 'method' Explicit Requesting method mimicing the jQuery functionality: GET, POST 'inline' True or false, wheater to inline the javascript in onClick="" atttribute or append it to jQuery onLoad Stack. 'complete' String specifies javascript called after successful request or a shortname of a jQuery effect that should be applied to the 'update' element. 'beforeSend' String specifies javascript called before the request is sent, or a shortname of a jQuery effect that should be applied to the link clicked. 'noscript' True/false, include a noscript variant that directly requests the given $url (make sure to check $request->isXmlHttpRequest()) 'dataType' What type of data is the response returning? text, html, json? 'title' HTML Attribute title of the Anchor 'class' HTML Attribute class of the Anchor 'id' HTML Attribute id of the Anchor 'attribs' Array of Key-Value pairs with HTML Attribute names and their content.

BeforeSend Callback: Can include shortcuts as a string assignment to fire of effects before sending of request. Possible shortcuts are 'fadeOut', 'fadeOutSlow', 'hide', 'hideSlow', 'slideUp', 'flash',

Arguments
$label
String
Urls Title
$url
String
Link to Point to
$options
Array
$params
Array
Key Value Pairs of GET/POST Parameters
Output
String
Details
visibility
public
final
false
static
false
example
$options = array('beforeSend' => 'hideSlow', 'complete' => 'show');
link
http://docs.jquery.com/Ajax
Documentation was generated by DocBlox.