本站不兼容 8 以前的版本的 Interner Explorer 浏览器(或基于这些版本的 IE 的其他浏览器),并且页面样式不完全兼容 IE 8,我们建议你升级至 IE 9 或改用其他非 IE 浏览器

Mozest™

  • 正在加载用户菜单…

开放、分享、互助

转播到腾讯微博
返回列表 回复 发帖

[求助] 求救!我的 xajax组件不能正常工作

我在CSDN和 xajaxproject.org 以及百度都发帖了,还没人回复,郁闷中。。。,逛去逛来就进到火狐社区来了。希望有人帮忙解决
我直接用xajaxproject.org 的示例测试的:
<?
include_once ("xajax555/xajax_core/xajax.inc.php");
session_start();
$xajax = new xajax();
$xajax->registerFunction("sayhello");

function sayhello($arg){
$res = new xajaxResponse();
$res->assign("SomeElementId", "innerHTML", $arg);
return $res;
}

$xajax->processRequest();
?>
<html>
<head>
<?
$xajax->printJavascript("xajax555/");
?>
</head>
<body>
<div id="SomeElementId"></div>
<button>Click Me</button>
</body>
</html>
然后生成的页面:
<html>
<head>

<script type="text/javascript" charset="UTF-8">
/* <![CDATA[ */
try { if (undefined == xajax.config) xajax.config = {}; } catch (e) { xajax = {}; xajax.config = {}; };
xajax.config.requestURI = "http://www.freeeden.info/meme.php";
xajax.config.statusMessages = false;
xajax.config.waitCursor = true;
xajax.config.version = "xajax 0.5 rc2";
xajax.config.legacy = false;
xajax.config.defaultMode = "asynchronous";
xajax.config.defaultMethod = "POST";
/* ]]> */
</script>
<script type="text/javascript" src="[url=view-source:http://www.freeeden.info/xajax555/xajax_js/xajax_core.js]xajax555/xajax_js/xajax_core.js[/url]" charset="UTF-8"></script>
<script type="text/javascript" charset="UTF-8">
/* <![CDATA[ */
window.setTimeout(
function() {
  var scriptExists = false;
  try { if (xajax.isLoaded) scriptExists = true; }
  catch (e) {}
  if (!scriptExists) {
   alert("Error: the xajax Javascript component could not be included. Perhaps the URL is incorrect?\nURL: xajax555/xajax_js/xajax_core.js");
  }
}, 2000);
/* ]]> */
</script>

<script type='text/javascript' charset='UTF-8'>
/* <![CDATA[ */
xajax_sayhello = function() { return xajax.request( { xjxfun: 'sayhello' }, { parameters: arguments } ); };
/* ]]> */
</script>
</head>
<body>
<div id="SomeElementId"></div>
<button onclick="xajax_sayhello('It worked!');">Click Me</button>

Error: the xajax Javascript component could not be included. Perhaps the URL is incorrect?\nURL: xajax555/xajax_js/xajax_core.js");
还说十分钟学会。折腾我几天了。。。先谢谢了!
没听说过xajax
xajax是Php 的验证表单类库啊。这儿又解决不了,我上哪去啊,版主再看看吧
xajax是Php 的验证表单类库啊。这儿又解决不了,我上哪去啊,版主再看看吧
ren5xing 发表于 2010-7-2 15:03
PHP去PHP的论坛.

不好意思.

版主不是万能的.

不信,你去问问人家.