IDE 缺少基础能力集调用库,这是一个简单的Ajax调用。
var jsonObj;
var xmlhttp = null;
function callAsync(url, callbackSuccess)
{
xmlhttp = new Ajax();
xmlhttp.open("GET", url, true);
xmlhttp.onreadystatechange=function()
{
// readyState = 4 ; "complete"
if (xmlhttp.readyState==4)
{
// status = 200 ; "ok"
if(xmlhttp.status == 200)
{
uiManager.showNotification(1000, "ok", "Done");
/*
* Remove the substr "jsonFlickrApi(" from the responseText
*/
var text = xmlhttp.responseText;
text = text.substr(14, text.length-15);
// Create JSON Oject
jsonObj = eval('(' + text + ')');
callbackSuccess(jsonObj);
}
else
{
uiManager.showNotification(1000, "warning", "Failed to get data from server");
}
}
}
xmlhttp.send(null);
}
相关文档:
一、概述
考虑Html本身不带定时刷新页面的控件,且不考虑使用第三方控件;因此考虑使用Javascript中的setTimeout+xmlhttp来实现定时更新页面中部分内容,此实现在IE6.0及以上版本测试通过,其他浏览器暂时未测试过。
二、功能及特点
1、Javascript通过Microsoft的MSXML对象,动态获取后台数据库数据;
&n ......
在 Web 应用程序中,多对多(m:m)关系很难处理。在 精通 Grails 系列的这一期文章中,Scott Davis 将向您展示如何在 Grails 中成功实现 m:m 关系。了解如何通过 Grails 对象关系映射(Grails Object Relational Mapping,GORM)API 和后端数据库处理多对多关系。学习如何使用 Ajax(Asynchronous JavaScript + XML)流线化 ......
function createXMLHttpRequest(){
if(window.ActiveXObject){
http = new ActiveXObject("Microsoft.XMLHTTP");
}else if(window.XMLHttpRequest){
& ......
PopupControl扩展器控件可以附加到任何控件之上,当用户点击该控件时,将弹出一个预先指定好的、显示附加信息或用来帮助用户执行某些设定的Panel。当该控件失去输入焦点之后,Panel将自动消失,且用户在其中进行的配置将被设定到扩展器的目标控件之上。
实 ......