Magazine
 
Quick Review:Ajax
 
Ajax and XML: Five cool Ajax widgets
 

Figure 5. The new content after clicking ok

Simple interface upgrades like these can make a world of difference in the usability of your application. Waiting for page loads — especially from slow servers — gives the impression of a clunky, old-style interface. Using simple tools such as this in-place editor can really spruce up your application with very little in terms of implementation complexity.

DHTML windows
It’s probably a good thing that browsers make it difficult to build modal windows into Web pages. But sometimes, small windows can be a good thing. They are handy to display alerts or to bring up small forms. They’re also a great way to launch annoying ads that cover the content of the page. Oh, wait: Scrap that last one. Anyway, as I said, it’s not easy to build windows for Dynamic HTML (DHTML) pages. So I was happy when I found this extremely robust window package based on the popular Protoype.js library. Not only was it easy to use, but the interface was skinnable and works well on every browser. Listing 7 shows the window.html page.

Listing 7. Window.html

<html>
<head>
<link href=”default.css” rel=”stylesheet” type=”text/css” />
<script src=”prototype.js”></script>
<script src=”window.js”></script>
</head>
<body>
<script>
var win = new Window( ‘myPopup’, {
title: “Terms and Conditions”,
top:70, left:100, width:300, height:200,
resizable: true, url: “terms.html”,
showEffectOptions: { duration: 3 }
}
);
win.show();
</script>
</body>
</html>

Apr 2008 | Java Jazz Up | 54
previous
index
next
 
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,

30
, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 , 54, 55, 56, 57,

58
, 59, 60, 61, 62, 63 , 64, 65 , 66 , 67 , 68 , 69 , 70, 71, 72, 73, 74, 75, 76, 77, 78,   Download PDF