Treacle

Java Toxication!
posts(28) comments(15) trackbacks(0)
  • BlogJava
  • 联系
  • RSS 2.0 Feed 聚合
  • 管理

公告

Betake Java
Gape after Ruby!

Contact

Mail me!

Search

Google
Technorati search

Technorati Profile Get Conversations about BlogJava - TreaclePing Technorati

常用链接

  • 我的随笔
  • 我的评论
  • 我的参与
  • 最新评论

留言簿

  • 给我留言
  • 查看公开留言
  • 查看私人留言

随笔分类(30)

  •  Eclipse(2)
  •  English(5)
  •  Java(6)
  •  Portal(1)
  •  ROR(4)
  •  Self(12)

随笔档案(28)

  • 2008年7月 (2)
  • 2005年9月 (3)
  • 2005年8月 (2)
  • 2005年7月 (2)
  • 2005年6月 (19)

文章分类(4)

  •  Java
  •  Others(3)
  •  ROR(1)

文章档案(2)

  • 2005年6月 (2)

相册

  • MySelf
  • 诗词

收藏夹(2)

  •  Java
  •  Net(1)
  •  Portal(1)
  •  UI

Friends

  •  Salomon's Java Castle

最新评论

  • 1. re: 一款好用的图形转换软件
  • 杂用啊?
  • --李力
  • 2. re: 许久未来了
  • 同感............
  • --久城
  • 3. re: 一款好用的图形转换软件
  • XZXZXZ
  • --213
  • 4. re: AjaxFaces 1.0 released
  • 网页打不开阿,博主能发给我吗,谢谢
  • --gembin
  • 5. re: Ruby概述
  • 惊讶!怎么回复表单中正确地显示了我的所有信息?
  • --靖郭郭

阅读排行榜

  • 1. 一款好用的图形转换软件(1836)
  • 2. 用GOOGLE你瞬间成为黑客(1800)
  • 3. 网络经典命令行(1489)
  • 4. Language Oriented Programming 面向语言编程(1364)
  • 5. Use Ruby send email(1312)

评论排行榜

  • 1. 一款好用的图形转换软件(5)
  • 2. 问dudu一个问题(3)
  • 3. Get total lines of files(2)
  • 4. 许久未来了(1)
  • 5. Ruby概述(1)

View Post

'AJAX in Action' on JavaRSS

JavaRSS, an aggregation site, has published an article called "AJAX in Action," showing how AJAX is being used on the site to display summaries of items based on mouseover, rather than including the summaries in the home page. Benefits for JavaRSS included a front page that was much smaller and, thus, much faster on initial load.

The heart of the AJAX functionality is in this code, which talks to a custom JSP page on JavaRSS to retrieve the description:

function getDescription(channelId,itemId) {
  
var url = 'http://localhost:8080/getDescription.jsp?channelId=' + channelId + '&itemId=' + itemId;
  if (window.XMLHttpRequest) {
    req 
= new XMLHttpRequest();
  } 
else if (window.ActiveXObject) {
    req 
= new ActiveXObject("Microsoft.XMLHTTP");
  }
  req.onreadystatechange 
= processRequest;
  req.open(
"GET", url, true);
  req.send(
null);
}

function processRequest() {
  
if (req.readyState == 4) {
    
if (req.status == 200) {
      parseMessages();
    } 
else {
      alert ( 
"Not able to retrieve description" );
    }
  }
}

function parseMessages() {
  response 
= req.responseXML.documentElement;
  itemDescription 
= response.getElementsByTagName('description')[0].firstChild.data;
  alert ( itemDescription );
}


There has been a large amount of AJAX-related content on the Internet lately. Is AJAX poised to revolutionize the web user interface? Also, JavaRSS uses a setting to enable AJAX in the user interface. How are you handling cases where the browser might not be able to handle AJAX? What about accessibility? Has anyone worked out how to handle blind users' interactions with AJAX?

posted on 2005-06-02 16:25 Blake HAN 阅读(167) 评论(0)  编辑  收藏 所属分类: Others

新用户注册  刷新评论列表  

只有注册用户登录后才能发表评论。


网站导航:
博客园   IT新闻   Chat2DB   C++博客   博问   管理
 
 
Powered by:
BlogJava
Copyright © Blake HAN