当前位置: 首页>>代码示例>>PHP>>正文


PHP xajax::autoCompressJavaScript方法代码示例

本文整理汇总了PHP中xajax::autoCompressJavaScript方法的典型用法代码示例。如果您正苦于以下问题:PHP xajax::autoCompressJavaScript方法的具体用法?PHP xajax::autoCompressJavaScript怎么用?PHP xajax::autoCompressJavaScript使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在xajax的用法示例。


在下文中一共展示了xajax::autoCompressJavaScript方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: transfield

$core = '../../xajax_core';
require_once $core . '/xajax.inc.php';
$xajax = new xajax();
require_once '../../xajax_plugins/response/swfupload/swfupload.inc.php';
$xajax->configure("javascript URI", "../../");
$xajax->configure("responseType", "XML");
$xajax->register(XAJAX_FUNCTION, "uploader", array("mode" => "'SWFupload'", "SWFform" => "'upload_form'"));
$xajax->register(XAJAX_FUNCTION, "transform");
$xajax->register(XAJAX_FUNCTION, "transfield");
$xajax->register(XAJAX_FUNCTION, "destroyfield");
$xajax->register(XAJAX_FUNCTION, "sync_test", array('mode' => "'synchronous'"));
$xajax->register(XAJAX_FUNCTION, "destroyform");
$_SESSION['foo']++;
$xajax->processRequest();
// This is dev code, you don't need these lines for using the SWFupload plugin.
$xajax->autoCompressJavaScript(null, true);
$xajax->autoCompressJavaScript('../../xajax_plugins/response/swfupload/swfupload.xajax.js', true);
$xajax->autoCompressJavaScript('../../xajax_plugins/response/swfupload/swfupload.js', true);
function transfield()
{
    $objResponse = new xajaxResponse();
    $foo = "\n\t\t\t<input type='text' name='testfieldtext' value='foo' /><br />\n\t\t\t<input type='file' name='filetest' id='filetest' />\n\t\t";
    $objResponse->assign('fieldtest', 'innerHTML', $foo);
    $objResponse->clsSwfUpload->transField('filetest', array("file_types" => "*.jpg;*.gif;*.png;", "file_types_description" => "Image Files or mp3", "file_size_limit" => "5 MB", "upload_complete_handler" => "function () {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}", "post_params" => array("PHPSESSID" => session_id())), true);
    return $objResponse;
}
function destroyField()
{
    $objResponse = new xajaxResponse();
    $objResponse->clsSwfUpload->destroyField('filetest');
    $objResponse->assign('fieldtest', 'innerHTML', '');
开发者ID:xajax,项目名称:xajax,代码行数:31,代码来源:swfupload.php

示例2: testForm

require_once "../xajax_core/xajax.inc.php";
function testForm($formData)
{
    $objResponse = new xajaxResponse();
    $objResponse->alert("formData: " . print_r($formData, true));
    $objResponse->assign("submittedDiv", "innerHTML", nl2br(print_r($formData, true)));
    return $objResponse;
}
$xajax = new xajax();
//$xajax->configure("debug", true);
$xajax->register(XAJAX_FUNCTION, "testForm");
$xajax->processRequest();
$xajax->configure('javascript URI', '../');
#$xajax->configure('useUncompressedScripts',true);
$xajax->autoCompressJavaScript(null, true);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Form Submission Test| xajax Tests</title>
	<style type="text/css">
		fieldset > div {
			border           : 1px solid gray;
			padding          : 5px;
			background-color : white;
		}
	</style>
开发者ID:xajax,项目名称:xajax,代码行数:29,代码来源:formSubmissionTest.php


注:本文中的xajax::autoCompressJavaScript方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。