<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.atalasoft.com/cs/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">David Cilley's AJAX Imaging Blog</title><subtitle type="html">Thoughts on ASP.NET, AJAX, cross-browser JavaScript, and other thin client technologies.</subtitle><id>http://www.atalasoft.com/cs/blogs/davidcilley/atom.aspx</id><link rel="alternate" type="text/html" href="http://www.atalasoft.com/cs/blogs/davidcilley/default.aspx" /><link rel="self" type="application/atom+xml" href="http://www.atalasoft.com/cs/blogs/davidcilley/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2006-05-10T16:09:00Z</updated><entry><title>Ajax Image Sliders Part 3: Intervals with Opacity</title><link rel="alternate" type="text/html" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx" /><id>http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx</id><published>2008-04-28T19:20:00Z</published><updated>2008-04-28T19:20:00Z</updated><content type="html">&lt;P&gt;This is Part&amp;nbsp;3 of a&amp;nbsp;multi-part blog series.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A class="" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx"&gt;The&amp;nbsp;OnDemand method&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx"&gt;The Interval method&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;The Interval Opacity method&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;On the previous two slider examples, I used a YUI slider that had a range from -100 to 100, with a total of 201 possible&amp;nbsp;values.&amp;nbsp; Both of these examples still have some&amp;nbsp;disconnect from the action performed, and still feel like we're on the web.&amp;nbsp; I promised that we could improve upon this, and I don't mean by adding more intervals... there's one more browser trick we can use to get this right.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The Interval Opacity Method&lt;BR&gt;&lt;/STRONG&gt;This is possibly the most responsive method for using sliders with images in the native browser.&amp;nbsp; This method builds upon the Interval method by using browser native opacity to 'create' the missing&amp;nbsp;steps between the intervals that we've already downloaded.&amp;nbsp; This also removes the OnDemand portion that was causing the flicker in &lt;A class="" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx"&gt;Part 2&lt;/A&gt;.&amp;nbsp; Two&amp;nbsp;image tags are shown in this method, one on top of the other, the the top one partially opaque depending on the percentage between intervals.&lt;/P&gt;
&lt;P&gt;Without changing the server side code of &lt;A class="" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx"&gt;Part 1&lt;/A&gt;,&amp;nbsp;and making a few changes to the&amp;nbsp;client side code that we've built&amp;nbsp;in &lt;A class="" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx"&gt;Part 2&lt;/A&gt;,&amp;nbsp;we get a&amp;nbsp;visual update for every available value of the slider.&amp;nbsp; As of this posting, this method works in IE 5.5/6/7, Mozilla Firefox, Safari, and Opera.&lt;/P&gt;
&lt;P&gt;Here's the demo:&lt;/P&gt;
&lt;P&gt;&lt;IFRAME border=0 marginWidth=0 marginHeight=0 src="http://www.flashxsfx.com/blogdemos/SliderDemo/Slider_IntervalOpacity.aspx" frameBorder=0 width=320 scrolling=no height=290&gt;&lt;/IFRAME&gt;&lt;/P&gt;
&lt;P&gt;Here's what you need:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;An input tag to hold/edit the value (I used a text box)&lt;/LI&gt;
&lt;LI&gt;A JavaScript slider control (YUI slider in this example)&lt;/LI&gt;
&lt;LI&gt;Some JavaScript event handlers&lt;/LI&gt;
&lt;LI&gt;A server side method that returns an updated image from a querystring containing a path and a change value&lt;/LI&gt;
&lt;LI&gt;A loop that creates a series of img tags on page load, and pre-populates them with images (client side)&lt;/LI&gt;
&lt;LI&gt;A method that shows and hides the tags as they are needed (client side)&lt;/LI&gt;
&lt;LI&gt;A method that shows partially opaque images, using style.opacity or style.filter = alpha(value) for IE&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;The server side code for this example is attached&amp;nbsp;the &lt;A class="" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx"&gt;Part 1&amp;nbsp;article&lt;/A&gt;, I have provided the&amp;nbsp;client-side&amp;nbsp;code&amp;nbsp;inline:&lt;/P&gt;
&lt;DIV style="PADDING-RIGHT:6px;PADDING-LEFT:6px;PADDING-BOTTOM:6px;OVERFLOW:scroll;PADDING-TOP:6px;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt; &amp;lt;!-- YUI Dependencies --&amp;gt;&lt;BR&gt; &amp;lt;script type="text/javascript" src="&lt;A href="http://yui.yahooapis.com/2.5.1/build/yahoo-dom-event/yahoo-dom-event.js%22%3E%3C/script"&gt;http://yui.yahooapis.com/2.5.1/build/yahoo-dom-event/yahoo-dom-event.js%22%3E%3C/script&lt;/A&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;script type="text/javascript" src="&lt;A href="http://yui.yahooapis.com/2.5.1/build/animation/animation-min.js%22%3E%3C/script"&gt;http://yui.yahooapis.com/2.5.1/build/animation/animation-min.js%22%3E%3C/script&lt;/A&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;script type="text/javascript" src="&lt;A href="http://yui.yahooapis.com/2.5.1/build/dragdrop/dragdrop-min.js%22%3E%3C/script"&gt;http://yui.yahooapis.com/2.5.1/build/dragdrop/dragdrop-min.js%22%3E%3C/script&lt;/A&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;script type="text/javascript" src="&lt;A href="http://yui.yahooapis.com/2.5.1/build/slider/slider-min.js%22%3E%3C/script"&gt;http://yui.yahooapis.com/2.5.1/build/slider/slider-min.js%22%3E%3C/script&lt;/A&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;lt;!-- XHTML --&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;div&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;  &amp;lt;div id="container"&amp;gt;&amp;lt;asp:Image ID="Image1" runat="server" ImageUrl="images/spacer.gif" Width="320" Height="240" /&amp;gt;&amp;lt;/div&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;  &amp;lt;div style="padding-left:6px;"&amp;gt;Gamma&amp;lt;/div&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;  &amp;lt;div id="sliderbg" style="position:relative; background:url(images/bg-fader.gif) 5px 0 no-repeat; height:28px; width:228px;"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &amp;lt;div id="sliderthumb" style="position: absolute; top: 4px;"&amp;gt;&amp;lt;img src="images/thumb-n.gif" /&amp;gt;&amp;lt;/div&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;  &amp;lt;/div&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;input id="gammaVal" maxlength="4" size="4" type="text" value="0" style="position:relative; left:230px; top:-24px;" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;/div&amp;gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt; &amp;lt;script type="text/javascript"&amp;gt;&lt;BR&gt;	var _slider;&lt;BR&gt;	var _gammaVal = document.getElementById('gammaVal');&lt;BR&gt;	var _url = 'Images/Rosebud.jpg'; // Starting image url&lt;BR&gt;	var _path = '&amp;lt;%= this.Page.Request.CurrentExecutionFilePath %&amp;gt;'; // url path of this page&lt;BR&gt;&amp;nbsp;&lt;BR&gt;	var _imgs;&amp;nbsp;// Array used to hold the img tags used for the images&lt;BR&gt;	var _steps = 20;&lt;BR&gt;	var _range = 200;&lt;BR&gt;	var _container = document.getElementById('container');&lt;BR&gt;	var _showing = 0;&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;	function init(){&lt;BR&gt;		_slider = YAHOO.widget.Slider.getHorizSlider("sliderbg", "sliderthumb", 0, _range);&lt;BR&gt;		_slider.subscribe('change', chgInterval); // Updates the text field and the image&lt;BR&gt;		&lt;BR&gt;		_imgs = new Array();&lt;BR&gt;		// pre loads the images se we don't have to wait for them to load&lt;BR&gt;	 	for (var g = 0; g &amp;lt;= _steps ; g++){&lt;BR&gt;			var i = new Image();&lt;BR&gt;				i.src = _path + '?img=' + _url + '&amp;amp;gamma=' + (g * (_range / _steps));&lt;BR&gt;				i.style.left = '0px';	&lt;BR&gt;				i.style.top = '0px';&lt;BR&gt;				i.style.position = 'absolute';&lt;BR&gt;				i.style.visibility = 'hidden';&lt;BR&gt;			&lt;BR&gt;			_container.appendChild(i);&lt;BR&gt;			_imgs.push(i);&lt;BR&gt;		}&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;		YAHOO.util.Event.on(_gammaVal, "blur", checkValue);&lt;BR&gt;		YAHOO.util.Event.on(_gammaVal, "keydown", keyDown);&lt;BR&gt;		checkValue();&lt;BR&gt;	} &lt;BR&gt;	&lt;BR&gt;	YAHOO.util.Event.onDOMReady(init);&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;	// Changes the text field value&lt;BR&gt;	function chgValue(x){&lt;BR&gt;		_gammaVal.value = x - 100;&lt;BR&gt;	}&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;	// hides the image at the given interval, and the image overlaying it (if any)&lt;BR&gt;	function hide(i){&lt;BR&gt;		_imgs[i].style.visibility = 'hidden';&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;		if (i + 1 &amp;lt; _imgs.length){&lt;BR&gt;			_imgs[i + 1].style.visibility = 'hidden';&lt;BR&gt;		}&lt;BR&gt;	}&lt;BR&gt;	&lt;BR&gt;	// shows the image at the given interval, and the image overlaying it (if any)&lt;BR&gt;	function show(i){&lt;BR&gt;		_imgs[i].style.visibility = 'visible';&lt;BR&gt;	&lt;BR&gt;		if (i + 1 &amp;lt; _imgs.length){&lt;BR&gt;			_imgs[i + 1].style.visibility = 'visible';&lt;BR&gt;		}&lt;BR&gt;	}&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;	// Changes the shown img tag&lt;BR&gt;	function chgInterval(x){&lt;BR&gt;		var shownum = Math.floor(x/(_range/_steps));&lt;BR&gt;		var opacity = Math.round(((x/(_range/_steps)) - shownum) * 100);&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;		if (shownum != _showing){&lt;BR&gt;			hide(_showing);&lt;BR&gt;			show(shownum);&lt;BR&gt;			_showing = shownum;&lt;BR&gt;		}&lt;BR&gt;		&lt;BR&gt;		// set the opacity of the overlaying image, to a percentage &lt;BR&gt;		if (_showing + 1 &amp;lt; _imgs.length){&lt;BR&gt;			setOpacity(_imgs[_showing + 1], opacity);&lt;BR&gt;		}&lt;BR&gt;		&lt;BR&gt;		setOpacity(_imgs[_showing], 100);&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;		chgValue(x);&lt;BR&gt;	}&lt;BR&gt;	&lt;BR&gt;	// sets the percentage based opacity (0-100) of the given object&lt;BR&gt;	function setOpacity(obj, opacity){&lt;BR&gt;		obj.style.opacity = (opacity / 100);&lt;BR&gt;		obj.style.filter = 'alpha(opacity=' + opacity + ')';&lt;BR&gt;	}&lt;BR&gt;	&lt;BR&gt;	// Checks the value of the text field, and sets the slider to that value&lt;BR&gt;	function checkValue(){&lt;BR&gt;		i = parseInt(_gammaVal.value);&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;		if (isNaN(i)){&lt;BR&gt;			i = _slider.getValue() - 100;&lt;BR&gt;		}&lt;BR&gt;			&lt;BR&gt;		_slider.setValue(i + 100, false);&lt;BR&gt;	}&lt;BR&gt;	&lt;BR&gt;	// Used to determine if the enter key has been pressed&lt;BR&gt;	function keyDown(k){&lt;BR&gt;		if (k.keyCode == 13){&lt;BR&gt;			checkValue();&lt;BR&gt;			return false;&lt;BR&gt;		}&lt;BR&gt;	}&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;&amp;lt;/script&amp;gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx&amp;amp;;subject=Ajax+Image+Sliders+Part+3%3a+Intervals+with+Opacity" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx&amp;amp;;title=Ajax+Image+Sliders+Part+3%3a+Intervals+with+Opacity" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx&amp;amp;title=Ajax+Image+Sliders+Part+3%3a+Intervals+with+Opacity" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx&amp;amp;;title=Ajax+Image+Sliders+Part+3%3a+Intervals+with+Opacity" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx&amp;amp;;title=Ajax+Image+Sliders+Part+3%3a+Intervals+with+Opacity&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=13783" width="1" height="1"&gt;</content><author><name>David Cilley</name><uri>http://www.atalasoft.com/cs/members/David+Cilley.aspx</uri></author><category term="AJAX" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/AJAX/default.aspx" /><category term="JavaScript" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/JavaScript/default.aspx" /><category term="YUI" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/YUI/default.aspx" /><category term="Sliders" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/Sliders/default.aspx" /></entry><entry><title>Ajax Image Sliders Part 2: Intervals with On Demand</title><link rel="alternate" type="text/html" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx" /><id>http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx</id><published>2008-04-21T14:23:00Z</published><updated>2008-04-21T14:23:00Z</updated><content type="html">&lt;P&gt;This is Part&amp;nbsp;2 of a&amp;nbsp;multi-part blog series.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A class="" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx"&gt;The&amp;nbsp;OnDemand method&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;The Interval method&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx"&gt;The Interval Opacity method&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;On the previous slider example, I used a YUI slider that had a range from -100 to 100.&amp;nbsp; This is a total of 201 different combinations for one image dialog, and that's about 10-20 times more requests&amp;nbsp;than&amp;nbsp;a web server should have to&amp;nbsp;handle in a reasonable amount of time.&amp;nbsp; We want to make this look as if the slider is actually changing the image while we scroll it, but we don't want to request 201 images up front, and we don't want to load them all on demand either.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The Interval Method&lt;BR&gt;&lt;/STRONG&gt;This&amp;nbsp;method requests a series of images from the&amp;nbsp;server, at a set interval along the entire slider.&amp;nbsp; These images are requested&amp;nbsp;as the page is loading,&amp;nbsp;new requests are made&amp;nbsp;when the&amp;nbsp;slider has finished moving.&amp;nbsp; The pre-loaded images are stored in their own image tags, hidden and shown when needed.&amp;nbsp; This is along the same lines as many image pre-load scripts that were used for rollovers, many years ago.&lt;/P&gt;
&lt;P&gt;Without changing the server side code of &lt;A class="" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx"&gt;Part 1&lt;/A&gt;, I was able to use this method to create a slider that&amp;nbsp;looks dynamic enough to fool most people into thinking it's changing it on the fly.&amp;nbsp; Because the main image tag is updated to hold the new image when the drag thumb is dropped, there can&amp;nbsp;be a slight flicker.&amp;nbsp; We'll see if we can take care of that in Part 3.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the demo for this method:&lt;/P&gt;&lt;IFRAME border=0 marginWidth=0 marginHeight=0 src="http://www.flashxsfx.com/blogdemos/SliderDemo/Slider_OnDemandInterval.aspx" frameBorder=0 width=320 scrolling=no height=290&gt;&lt;/IFRAME&gt;
&lt;P&gt;Here's what you need:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;An img tag&lt;/LI&gt;
&lt;LI&gt;An input tag to hold/edit the value (I used a text box)&lt;/LI&gt;
&lt;LI&gt;A JavaScript slider control (YUI slider in this example)&lt;/LI&gt;
&lt;LI&gt;Some JavaScript event handlers&lt;/LI&gt;
&lt;LI&gt;A server side method that returns an updated image from a querystring containing a path and a change value&lt;/LI&gt;
&lt;LI&gt;A loop that creates a series of img tags on page load, and pre-populates them with images (client side)&lt;/LI&gt;
&lt;LI&gt;A method that shows and hides the tags as they are needed (client side)&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;The server side code for this example is attached&amp;nbsp;the &lt;A class="" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx"&gt;Part 1&amp;nbsp;article&lt;/A&gt;, I have provided the&amp;nbsp;client-side&amp;nbsp;code&amp;nbsp;inline:&lt;/P&gt;
&lt;DIV style="PADDING-RIGHT:6px;PADDING-LEFT:6px;PADDING-BOTTOM:6px;OVERFLOW:scroll;PADDING-TOP:6px;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;lt;!-- YUI Dependencies --&amp;gt;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;lt;script type="text/javascript" src="&lt;A href="http://yui.yahooapis.com/2.5.1/build/yahoo-dom-event/yahoo-dom-event.js%22%3E%3C/script"&gt;http://yui.yahooapis.com/2.5.1/build/yahoo-dom-event/yahoo-dom-event.js%22%3E%3C/script&lt;/A&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;script type="text/javascript" src="&lt;A href="http://yui.yahooapis.com/2.5.1/build/animation/animation-min.js%22%3E%3C/script"&gt;http://yui.yahooapis.com/2.5.1/build/animation/animation-min.js%22%3E%3C/script&lt;/A&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;script type="text/javascript" src="&lt;A href="http://yui.yahooapis.com/2.5.1/build/dragdrop/dragdrop-min.js%22%3E%3C/script"&gt;http://yui.yahooapis.com/2.5.1/build/dragdrop/dragdrop-min.js%22%3E%3C/script&lt;/A&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;script type="text/javascript" src="&lt;A href="http://yui.yahooapis.com/2.5.1/build/slider/slider-min.js%22%3E%3C/script"&gt;http://yui.yahooapis.com/2.5.1/build/slider/slider-min.js%22%3E%3C/script&lt;/A&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;lt;!-- XHTML --&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;div&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;div id="container"&amp;gt;&amp;lt;asp:Image ID="Image1" runat="server" ImageUrl="images/spacer.gif" Width="320" Height="240" /&amp;gt;&amp;lt;/div&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;div style="padding-left:6px;"&amp;gt;Gamma&amp;lt;/div&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;div id="sliderbg" style="position:relative; background:url(images/bg-fader.gif) 5px 0 no-repeat; height:28px; width:228px;"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;div id="sliderthumb" style="position: absolute; top: 4px;"&amp;gt;&amp;lt;img src="images/thumb-n.gif" /&amp;gt;&amp;lt;/div&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/div&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;input id="gammaVal" maxlength="4" size="3" type="text" value="0" style="position:relative; left:230px; top:-24px;" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;/div&amp;gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;BR&gt;&amp;nbsp;var _slider;&lt;BR&gt;&amp;nbsp;var _gammaVal = document.getElementById('gammaVal');&lt;BR&gt;&amp;nbsp;var _img = document.getElementById('&amp;lt;%= this.Image1.ClientID %&amp;gt;');&amp;nbsp; // ASP.NET server control is used for server side access&lt;BR&gt;&amp;nbsp;var _url = 'Images/Rosebud.jpg'; // Starting image url&lt;BR&gt;&amp;nbsp;var _path = '&amp;lt;%= this.Page.Request.CurrentExecutionFilePath %&amp;gt;'; // url path of this page&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;var _imgs;&amp;nbsp;// Array used to hold the img tags used for the images&lt;BR&gt;&amp;nbsp;var _steps = 20;&lt;BR&gt;&amp;nbsp;var _range = 200;&lt;BR&gt;&amp;nbsp;var _container = document.getElementById('container');&lt;BR&gt;&amp;nbsp;var _showing = 0;&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;function init(){&lt;BR&gt;&amp;nbsp;&amp;nbsp;_slider = YAHOO.widget.Slider.getHorizSlider("sliderbg", "sliderthumb", 0, _range);&lt;BR&gt;&amp;nbsp;&amp;nbsp;_slider.subscribe('change', chgInterval); // Updates the text field and the image&lt;BR&gt;&amp;nbsp;&amp;nbsp;_slider.subscribe('slideEnd', chgImg); // Updates the image&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;_imgs = new Array();&lt;BR&gt;&amp;nbsp;&amp;nbsp;// pre loads the images se we don't have to wait for them to load&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;for (var g = 0; g &amp;lt;= _steps ; g++){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var i = new Image();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i.src = _path + '?img=' + _url + '&amp;amp;gamma=' + (g * (_range / _steps));&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i.style.left = '0px';&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i.style.top = '0px';&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i.style.position = 'absolute';&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i.style.visibility = 'hidden';&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_container.appendChild(i);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_imgs.push(i);&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YAHOO.util.Event.on(_gammaVal, "blur", checkValue);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YAHOO.util.Event.on(_gammaVal, "keydown", keyDown);&lt;BR&gt;&amp;nbsp;&amp;nbsp;checkValue();&lt;BR&gt;&amp;nbsp;} &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;YAHOO.util.Event.onDOMReady(init);&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;// Changes the text field value&lt;BR&gt;&amp;nbsp;function chgValue(x){&lt;BR&gt;&amp;nbsp;&amp;nbsp;_gammaVal.value = x - 100;&lt;BR&gt;&amp;nbsp;}&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;// Changes the url of the img tag&lt;BR&gt;&amp;nbsp;function chgImg(){&lt;BR&gt;&amp;nbsp;&amp;nbsp;_img.src = _path + '?img=' + _url + '&amp;amp;gamma=' + (parseInt(_gammaVal.value) + 100);&lt;BR&gt;&amp;nbsp;&amp;nbsp;hideShowing();&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;function hideShowing(){&lt;BR&gt;&amp;nbsp;&amp;nbsp;_imgs[_showing].style.visibility = 'hidden';&lt;BR&gt;&amp;nbsp;}&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;// Changes the shown img tag&lt;BR&gt;&amp;nbsp;function chgInterval(x){&lt;BR&gt;&amp;nbsp;&amp;nbsp;var shownum = Math.round(x/(_range/_steps));&lt;BR&gt;&amp;nbsp;&amp;nbsp;if (shownum != _showing){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;hideShowing();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_showing = shownum;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_imgs[_showing].style.visibility = 'visible';&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp;chgValue(x);&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;// Checks the value of the text field, and sets the slider to that value&lt;BR&gt;&amp;nbsp;function checkValue(){&lt;BR&gt;&amp;nbsp;&amp;nbsp;i = parseInt(_gammaVal.value);&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp;if (isNaN(i)){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;i = _slider.getValue() - 100;&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;_slider.setValue(i + 100, false);&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;// Used to determine if the enter key has been pressed&lt;BR&gt;&amp;nbsp;function keyDown(k){&lt;BR&gt;&amp;nbsp;&amp;nbsp;if (k.keyCode == 13){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;checkValue();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return false;&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;}&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Courier New"&gt;&amp;lt;/script&amp;gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt;&lt;BR&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/SPAN&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx&amp;amp;;subject=Ajax+Image+Sliders+Part+2%3a+Intervals+with+On+Demand" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx&amp;amp;;title=Ajax+Image+Sliders+Part+2%3a+Intervals+with+On+Demand" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx&amp;amp;title=Ajax+Image+Sliders+Part+2%3a+Intervals+with+On+Demand" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx&amp;amp;;title=Ajax+Image+Sliders+Part+2%3a+Intervals+with+On+Demand" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx&amp;amp;;title=Ajax+Image+Sliders+Part+2%3a+Intervals+with+On+Demand&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=13725" width="1" height="1"&gt;</content><author><name>David Cilley</name><uri>http://www.atalasoft.com/cs/members/David+Cilley.aspx</uri></author><category term="AJAX" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/AJAX/default.aspx" /><category term="JavaScript" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/JavaScript/default.aspx" /><category term="YUI" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/YUI/default.aspx" /><category term="Sliders" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/Sliders/default.aspx" /></entry><entry><title>AJAX Image Sliders: Part 1</title><link rel="alternate" type="text/html" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx" /><link rel="enclosure" type="text/plain" length="4511" href="http://www.atalasoft.com/cs/blogs/davidcilley/attachment/13695.ashx" /><id>http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx</id><published>2008-04-16T14:25:00Z</published><updated>2008-04-16T14:25:00Z</updated><content type="html">&lt;P&gt;This is Part 1 of a&amp;nbsp;multi-part blog series.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The&amp;nbsp;OnDemand method&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/21/ajax-image-sliders-part-2-intervals-with-on-demand.aspx"&gt;The Interval method&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/28/sliders-part-3-intervals-with-opacity.aspx"&gt;The Interval Opacity method&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;One of the most common dialogs in an image editor application is the slider with preview.&amp;nbsp; When you move these applications over to the Web, you end up losing some of the user experience because of the asynchronous nature of these apps.&lt;/P&gt;
&lt;P&gt;There are several ways to use a JavaScript slider to change an image, and I will be covering at least 3 of them over the next few posts.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The "OnDemand" method:&lt;BR&gt;&lt;/STRONG&gt;This is probably the easiest to implement, but least user friendly.&amp;nbsp; I say it's not user friendly because the image only updates after the slider thumb has finished moving.&amp;nbsp; If we were to make the slider update for all points, it would innundate the server with requests.&amp;nbsp; The usage of a slider, however, is still an improvement over a postback or button/text field combination.&amp;nbsp; The feedback from the text box helps the user see that something is happening as well.&lt;/P&gt;
&lt;P&gt;Here's a demonstration:&lt;/P&gt;&lt;IFRAME border=0 marginWidth=0 marginHeight=0 src="http://www.flashxsfx.com/blogdemos/SliderDemo/Slider_OnDemand.aspx" frameBorder=0 width=320 scrolling=no height=290&gt;&lt;/IFRAME&gt;
&lt;P&gt;Here's what you need:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;An img tag&lt;/LI&gt;
&lt;LI&gt;An input tag to hold/edit the value(I used a text box)&lt;/LI&gt;
&lt;LI&gt;A JavaScript slider control (YUI slider in this example)&lt;/LI&gt;
&lt;LI&gt;Some JavaScript event handlers&lt;/LI&gt;
&lt;LI&gt;A server side method that returns an updated image from a querystring containing a path and a change value&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;The server side code for this example is attached to this article (if you need it), I have provided the&amp;nbsp;client-side&amp;nbsp;code&amp;nbsp;inline:&lt;/P&gt;
&lt;DIV style="PADDING-RIGHT:6px;PADDING-LEFT:6px;PADDING-BOTTOM:6px;OVERFLOW:scroll;PADDING-TOP:6px;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt;&lt;PRE&gt;&amp;lt;!-- YUI Dependencies --&amp;gt;&amp;nbsp; &lt;BR&gt;&amp;lt;script type="text/javascript" src="&lt;A href="http://yui.yahooapis.com/2.5.1/build/yahoo-dom-event/yahoo-dom-event.js%22%3E%3C/script"&gt;http://yui.yahooapis.com/2.5.1/build/yahoo-dom-event/yahoo-dom-event.js%22%3E%3C/script&lt;/A&gt;&amp;gt;&lt;BR&gt;&amp;lt;script type="text/javascript" src="&lt;A href="http://yui.yahooapis.com/2.5.1/build/animation/animation-min.js%22%3E%3C/script"&gt;http://yui.yahooapis.com/2.5.1/build/animation/animation-min.js%22%3E%3C/script&lt;/A&gt;&amp;gt;&lt;BR&gt;&amp;lt;script type="text/javascript" src="&lt;A href="http://yui.yahooapis.com/2.5.1/build/dragdrop/dragdrop-min.js%22%3E%3C/script"&gt;http://yui.yahooapis.com/2.5.1/build/dragdrop/dragdrop-min.js%22%3E%3C/script&lt;/A&gt;&amp;gt;&lt;BR&gt;&amp;lt;script type="text/javascript" src="&lt;A href="http://yui.yahooapis.com/2.5.1/build/slider/slider-min.js%22%3E%3C/script"&gt;http://yui.yahooapis.com/2.5.1/build/slider/slider-min.js%22%3E%3C/script&lt;/A&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;lt;!-- XHTML --&amp;gt;&lt;BR&gt;&amp;lt;div&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;div&amp;gt;&amp;lt;asp:Image ID="Image1" runat="server" ImageUrl="images/spacer.gif" /&amp;gt;&amp;lt;/div&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;div style="padding-left:6px;"&amp;gt;Gamma&amp;lt;/div&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;div id="sliderbg" style="position:relative; background:url(images/bg-fader.gif) 5px 0 no-repeat; height:28px; width:228px;"&amp;gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;div id="sliderthumb" style="position: absolute; top: 4px;"&amp;gt;&amp;lt;img src="images/thumb-n.gif" /&amp;gt;&amp;lt;/div&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;input id="gammaVal" maxlength="4" size="3" type="text" value="0" style="position:relative; left:230px; top:-24px;" /&amp;gt;&lt;BR&gt;&amp;lt;/div&amp;gt;&lt;BR&gt;&lt;BR&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;BR&gt;&amp;nbsp;var _slider;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt;&amp;nbsp;var _gammaVal = document.getElementById('gammaVal');&lt;BR&gt;&amp;nbsp;var _img = document.getElementById('&amp;lt;%= this.Image1.ClientID %&amp;gt;');&amp;nbsp; // ASP.NET server control is used for server side access&lt;BR&gt;&amp;nbsp;var _url = 'Images/Rosebud.jpg'; // Starting image url&lt;BR&gt;&amp;nbsp;var _path = '&amp;lt;%= this.Page.Request.CurrentExecutionFilePath %&amp;gt;'; // url path of this page&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;function init(){&lt;BR&gt;&amp;nbsp;&amp;nbsp;_slider = YAHOO.widget.Slider.getHorizSlider("sliderbg", "sliderthumb", 0, 200);&lt;BR&gt;&amp;nbsp;&amp;nbsp;_slider.subscribe('change', chgValue); // Updates the text field while the value is changing&lt;BR&gt;&amp;nbsp;&amp;nbsp;_slider.subscribe('slideEnd', chgImg); // We only want to change the image after we've finished sliding&lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YAHOO.util.Event.on(_gammaVal, "blur", checkValue);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YAHOO.util.Event.on(_gammaVal, "keydown", keyDown);&lt;BR&gt;&amp;nbsp;&amp;nbsp;checkValue();&lt;BR&gt;&amp;nbsp;} &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;YAHOO.util.Event.onDOMReady(init);&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt;&amp;nbsp;// Changes the text field value&lt;BR&gt;&amp;nbsp;function chgValue(x){&lt;BR&gt;&amp;nbsp;&amp;nbsp;_gammaVal.value = x - 100;&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt;&amp;nbsp;// Changes the url of the img tag&lt;BR&gt;&amp;nbsp;function chgImg(){&lt;BR&gt;&amp;nbsp;&amp;nbsp;_img.src = _path + '?img=' + _url + '&amp;amp;gamma=' + (parseInt(_gammaVal.value) + 100);&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;// Checks the value of the text field, and sets the slider to that value&lt;BR&gt;&amp;nbsp;function checkValue(){&lt;BR&gt;&amp;nbsp;&amp;nbsp;i = parseInt(_gammaVal.value);&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt;&amp;nbsp;&amp;nbsp;if (isNaN(i)){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;i = _slider.getValue() - 100;&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;_slider.setValue(i + 100, false);&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;// Used to determine if the enter key has been pressed&lt;BR&gt;&amp;nbsp;function keyDown(k){&lt;BR&gt;&amp;nbsp;&amp;nbsp;if (k.keyCode == 13){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;checkValue();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return false;&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt;&amp;lt;/script&amp;gt;&lt;BR&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/SPAN&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx&amp;amp;;subject=AJAX+Image+Sliders%3a+Part+1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx&amp;amp;;title=AJAX+Image+Sliders%3a+Part+1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx&amp;amp;title=AJAX+Image+Sliders%3a+Part+1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx&amp;amp;;title=AJAX+Image+Sliders%3a+Part+1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx&amp;amp;;title=AJAX+Image+Sliders%3a+Part+1&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/16/ajax-image-sliders-part-1.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=13695" width="1" height="1"&gt;</content><author><name>David Cilley</name><uri>http://www.atalasoft.com/cs/members/David+Cilley.aspx</uri></author><category term="AJAX" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/AJAX/default.aspx" /><category term="JavaScript" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/JavaScript/default.aspx" /><category term="YUI" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/YUI/default.aspx" /><category term="Sliders" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/Sliders/default.aspx" /></entry><entry><title>Non-Rectangular Masks on the Web: Part 1</title><link rel="alternate" type="text/html" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/04/non-rectangular-masks-on-the-web-part-1.aspx" /><id>http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/04/non-rectangular-masks-on-the-web-part-1.aspx</id><published>2008-04-04T19:45:00Z</published><updated>2008-04-04T19:45:00Z</updated><content type="html">&lt;p&gt;Over the past 15 or so years, I've edited and created a thousands of images.&amp;nbsp; I almost always use a mask for something, and it's very rarely only rectangular.&amp;nbsp;I have a need for doing this on the web, natively in the browser, and I might not be the only one.&lt;/p&gt;
&lt;p&gt;With JavaScript and the DOM, you can create a series rectangles that represent masks, but as the complexity of these masks go up, the number of DOM objects that need to be created go up.&amp;nbsp; This can make it slow to render, and slow to update.&lt;/p&gt;
&lt;p&gt;Most of the browsers used today show PNG images with an alpha channel(transparency) correctly.&lt;img src="http://www.atalasoft.com/cs/blogs/davidcilley/files/PNG_Mask.png" style="margin:4px;background-image:url(/cs/blogs/davidcilley/files/Hot_Air_Balloon_thumb.jpg);width:256px;height:256px;" align="right" height="256" width="256"&gt;&amp;nbsp;&amp;nbsp;PNG images with an&amp;nbsp;alpha channel can be used to mimic a client side mask by placing&amp;nbsp;them on top of the object that you want to mask.&amp;nbsp; The image to the right is one of these PNG images, with a JPG image behind it. There are three things you need to do to create a masking PNG image:&lt;br&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create an image with a background color of your choice, at the size of the object you are masking.&lt;/li&gt;
&lt;li&gt;Make the areas you want&amp;nbsp;selected completely transparent on the alpha channel (Black).&lt;/li&gt;
&lt;li&gt;Make the rest of the image half transparent on the alpha channel (Gray).&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The remaining parts that you will need will be some JavaScript mouse events that allow you to drag a box on the object (something like a selection marquee), and a server side method that will create the PNG image described above.&lt;/p&gt;
&lt;p&gt;Since I have access to DotImage, I can use the WebAnnotationViewer and RemoteInvoke to do everything.&amp;nbsp; In my case I decided to use a ReferencedImage annotation to hold the alpha PNG. &amp;nbsp;Here's a basic run down of the concept, using DotImage:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use the WebAnnotationViewer's Selection box to select an area on the image, and attach a JavaScript event to&amp;nbsp;the Selection.Changed.&amp;nbsp; (MaskSelection In this example)&lt;/li&gt;
&lt;li&gt;In the Selection.Changed JavaScript event, use RemoteInvoke to run a&amp;nbsp;Page level server side method that creates the masked PNG image from the selection box. (Remote_MaskSelection in this example)&lt;/li&gt;
&lt;li&gt;The server side method keeps two images in the disk cache.&amp;nbsp; One for the masked areas drawn, and one for the transparent PNG that represents those masked areas.&lt;/li&gt;
&lt;li&gt;Every time the server side method is called it overwrites these images with the new data from&amp;nbsp;selection rectangle of the WebAnnotationViewer, effectively appending what was selected to the new mask.&lt;/li&gt;
&lt;li&gt;The mask image is an 8-bit&amp;nbsp;grayscale which starts out completely gray (color index 127) to indicate half transparent.&amp;nbsp; Areas that are selected are drawn onto this image as black (index 0).&lt;/li&gt;
&lt;li&gt;The alpha PNG image is a 32-bit RGBA image with a background color (red in this case), and a SetAlphaFromMaskCommand is used to put the mask image into the alpha channel of this new PNG&lt;/li&gt;
&lt;li&gt;The alpha PNG is then added to an annotation on the server side, and the client side JavaScript&amp;nbsp;is notified that it needs to update the annotation.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Here is the code I used to create the mask&amp;nbsp;image and the alpha PNG:&lt;/p&gt;
&lt;div style="padding:6px;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span style="color:black;"&gt;&amp;nbsp;private void SynchronizeMaskAnnotation(Size size)&lt;br&gt;&amp;nbsp;{&lt;br&gt;&amp;nbsp; &amp;nbsp;&lt;span&gt;// This annotation was created on PageLoad, and is the only one on layer 0&lt;/span&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;AnnotationUI ann = this.WebAnnotationViewer1.Annotations.GetAnnotation(0, -1, 0);&lt;br&gt;&amp;nbsp; &amp;nbsp;&lt;br&gt;&amp;nbsp; &amp;nbsp;ReferencedImageAnnotation refAnn = ann as ReferencedImageAnnotation;&lt;br&gt;&amp;nbsp; &amp;nbsp;if (refAnn != null)&lt;br&gt;&amp;nbsp; &amp;nbsp;{&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;refAnn.Size = size;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ReferencedImageData refAnnData = refAnn.Data as ReferencedImageData;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (refAnnData != null)&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (refAnnData.ImageObject != null)&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;((Bitmap)refAnnData.ImageObject).Dispose();&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;GC.Collect(); &lt;span&gt;// This is done because the .NET Bitmap class doesn't free the file in time for us to write over it&lt;/span&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br&gt;&amp;nbsp; &amp;nbsp;}&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;this.WebAnnotationViewer1.UpdateAnnotations();&lt;br&gt;&amp;nbsp;}&lt;br&gt;&lt;br&gt;&amp;nbsp;private void AppendMask()&lt;br&gt;&amp;nbsp;{&lt;br&gt;&amp;nbsp; &amp;nbsp;string _pathToCache = System.Configuration.ConfigurationManager.AppSettings["AtalasoftWebControls_Cache"];&lt;br&gt;&amp;nbsp; &amp;nbsp;string _prefix = Page.Session.SessionID + "_";&lt;br&gt;&amp;nbsp; &amp;nbsp;string _pathToMask = this._pathToCache + _prefix + "Mask.png";&lt;br&gt;&amp;nbsp; &amp;nbsp;string _pathToMaskAnn = this._pathToCache + _prefix + "MaskAnn.png";&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;AtalaImage maskImage = null;&lt;br&gt;&amp;nbsp; &amp;nbsp;AtalaImage alphaPNG = null;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;try&lt;br&gt;&amp;nbsp; &amp;nbsp;{&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (File.Exists(Page.MapPath(_pathToMask)))&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;maskImage = new AtalaImage(Page.MapPath(_pathToMask));&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;maskImage = new AtalaImage(this.WebAnnotationViewer1.Image.Size.Width, this.WebAnnotationViewer1.Image.Size.Height, PixelFormat.Pixel8bppGrayscale, Color.Gray);&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;alphaPNG = new AtalaImage(maskImage.Width, maskImage.Height, PixelFormat.Pixel32bppBgra, Color.Red);&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Canvas maskCanvas = new Canvas(maskImage);&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;maskCanvas.DrawRectangle(this.WebAnnotationViewer1.Selection.Rectangle, new SolidFill(Color.Black));&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;SetAlphaFromMaskCommand alpha = new SetAlphaFromMaskCommand(maskImage, false, AlphaMergeType.Replace);&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ImageResults results = alpha.Apply(alphaPNG);&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (alphaPNG != results.Image)&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;alphaPNG.Dispose();&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;alphaPNG = results.Image;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;SynchronizeMaskAnnotation(alphaPNG.Size);&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;maskImage.Save(Page.MapPath(_pathToMask), new PngEncoder(), null);&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;alphaPNG.Save(Page.MapPath(_pathToMaskAnn), new PngEncoder(), null);&lt;br&gt;&amp;nbsp; &amp;nbsp;}&lt;br&gt;&amp;nbsp; &amp;nbsp;finally&lt;br&gt;&amp;nbsp; &amp;nbsp;{&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (maskImage != null)&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;maskImage.Dispose();&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (alphaPNG != null)&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;alphaPNG.Dispose();&lt;br&gt;&amp;nbsp; &amp;nbsp;}&lt;br&gt;&amp;nbsp;} &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/04/non-rectangular-masks-on-the-web-part-1.aspx&amp;amp;;subject=Non-Rectangular+Masks+on+the+Web%3a+Part+1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/04/non-rectangular-masks-on-the-web-part-1.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/04/non-rectangular-masks-on-the-web-part-1.aspx&amp;amp;;title=Non-Rectangular+Masks+on+the+Web%3a+Part+1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/04/non-rectangular-masks-on-the-web-part-1.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/04/non-rectangular-masks-on-the-web-part-1.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/04/non-rectangular-masks-on-the-web-part-1.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/04/non-rectangular-masks-on-the-web-part-1.aspx&amp;amp;title=Non-Rectangular+Masks+on+the+Web%3a+Part+1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/04/non-rectangular-masks-on-the-web-part-1.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/04/non-rectangular-masks-on-the-web-part-1.aspx&amp;amp;;title=Non-Rectangular+Masks+on+the+Web%3a+Part+1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/04/non-rectangular-masks-on-the-web-part-1.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/04/non-rectangular-masks-on-the-web-part-1.aspx&amp;amp;;title=Non-Rectangular+Masks+on+the+Web%3a+Part+1&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/04/04/non-rectangular-masks-on-the-web-part-1.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=13610" width="1" height="1"&gt;</content><author><name>David Cilley</name><uri>http://www.atalasoft.com/cs/members/David+Cilley.aspx</uri></author><category term="JavaScript" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/JavaScript/default.aspx" /><category term="PNG" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/PNG/default.aspx" /><category term="Masking" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/Masking/default.aspx" /></entry><entry><title>Atalasoft at AJAXWorld 2008 East</title><link rel="alternate" type="text/html" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/21/atalasoft-at-ajaxworld-2008-east.aspx" /><id>http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/21/atalasoft-at-ajaxworld-2008-east.aspx</id><published>2008-03-21T18:10:00Z</published><updated>2008-03-21T18:10:00Z</updated><content type="html">&lt;P&gt;This year's&amp;nbsp;&lt;A class="" href="http://www.ajaxworldexpo.com/" target=_blank&gt;AjaxWorld Conference &amp;amp; Expo&lt;/A&gt; was somewhat of a disappointment.&amp;nbsp; After experiencing the&amp;nbsp;problems&amp;nbsp;that I outlined last year,&amp;nbsp;I anticipated a better overall conference.&amp;nbsp; They did appear to take a few things into consideration,&amp;nbsp;such as the lunch breaks (this time you might have been able to sit down), and the communication of the free wireless access in the ballroom.&amp;nbsp; Very few of the sessions I attended were&amp;nbsp;informative beyond scratching the surface of a particular topic or product.&amp;nbsp; I felt like this conference was still trying to sell me the idea of using AJAX, rather than show us what we (as an AJAX&amp;nbsp;community) have been able accomplish since the last conference.&amp;nbsp; Here's a run down of the&amp;nbsp;problems I saw with this conference, in frustration level order (1 being the most frustrating):&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;This venue is too small.&amp;nbsp; Nearly every single session room was too small for the number of attendees that wanted to attend in any particular session (that I went to).&amp;nbsp; I missed three potentially interesting sessions because I couldn't even get into the room.&amp;nbsp; The sessions where I made it into a seat, still had anywhere from 5-20 people standing in the doorways&amp;nbsp;or sitting on the floor.&lt;/LI&gt;
&lt;LI&gt;Wireless access was still not communicated, but we knew to ask about it this time.&amp;nbsp; There was no way to connect to the internet unless you were in the&amp;nbsp;grand ballroom, most sessions were not in this room.&lt;/LI&gt;
&lt;LI&gt;If you didn't get to lunch or the snack break within the first 5-10 minutes, you might not get any food.&lt;/LI&gt;
&lt;LI&gt;Even though they improved the size of the dining area, there were many people standing and waiting for tables, even some sitting on the floor.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Most session slides were provided online, and not given to us beforehand on a cd (like last year).&amp;nbsp; Without&amp;nbsp;wireless access, this&amp;nbsp;was nearly&amp;nbsp;useless.&lt;/LI&gt;
&lt;LI&gt;They did not&amp;nbsp;enforce&amp;nbsp;the badges at all, everything was open to everyone, regardless of what ticket you paid for. (except meals)&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Sessions I attended:&lt;BR&gt;Day 1:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;Comet: The Web That's Instantly On and Always On&lt;/EM&gt;&lt;/STRONG&gt; by &lt;A class="" href="http://www.jroller.com/jonasjacobi/"&gt;Jonas Jacobi&lt;/A&gt; (Kaazing): This was a fairly vague session on Comet.&amp;nbsp; Jonas went over the Bayeux protocol, which is used to do server push(s) to a client browser without plugins.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;ASP.NET AJAX Design &amp;amp; Development Patterns&lt;/EM&gt;&lt;/STRONG&gt; by &lt;A class="" href="http://www.joeon.net/"&gt;Joe Stagner&lt;/A&gt; (Microsoft): This was a great overview on ASP.NET and ASP.NET AJAX design patterns. Joe explained that the UpdatePanel is not always the best way to make an AJAX app, even though it is one of the easiest, because it sends the entire page state back and forth from the server.&amp;nbsp; He covered several models, two of which I found interesting: The Service Model, and the After Processing Model.&amp;nbsp; I recommend taking a look at &lt;A class="" href="http://www.joeon.net/post/2008/03/My-AJAX-World-Downloads---AJAX-Security-amp%3b-AJAX-Patterns-Code-and-PowerPoints.aspx"&gt;his slides&lt;/A&gt;, which he has provided in his blog.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;Improving ASP.NET User Interfaces with the AJAX Control Toolkit&lt;/EM&gt;&lt;/STRONG&gt; by &lt;A class="" href="http://aspadvice.com/blogs/robertb/"&gt;Robert Boedigheimer&lt;/A&gt;&amp;nbsp;(The Schwan Food Company): This was a good overview on the ASP.NET AJAX Control Toolkit.&amp;nbsp; He demonstrated several of the controls, but since there was no internet access, he couldn't demonstrate everything that he wanted to.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Day 2:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;I&gt;&lt;B&gt;Can We Fix the Web? &lt;/B&gt;&lt;/I&gt;by &lt;A class="" href="http://www.crockford.com/" target=_blank&gt;Douglas Crockford&lt;/A&gt; (Yahoo!):&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;This was the keynote I was looking forward to, Douglas usually has something good to say.&amp;nbsp; He discussed that security is the main problem with the web.&amp;nbsp; He outlined a three pronged approach to fixing it:&amp;nbsp;&lt;BR&gt;- Safe JavaScript subsets, such as ADsafe, Caja, and Cajita&lt;BR&gt;- Small browser improvements, like JSONRequest, and vats (where only part of the dom is accessible)&lt;BR&gt;- Massive browser improvements, like replacing JavaScript altogether with a new secure language, and&amp;nbsp;creating a common text protocol to replace HTTP&lt;BR&gt;I agree that the Internet and it's components were not designed for many of the things we are doing with it today, but I don't believe that we need to start over.&amp;nbsp; The new and exciting applications that come out every day will push the technology toward where it needs to be.&lt;/LI&gt;
&lt;LI&gt;&lt;I&gt;&lt;B&gt;An Introduction to the YUI Library&lt;/B&gt;&lt;/I&gt; by&amp;nbsp;&lt;A class="" href="http://blog.360.yahoo.com/blog-JG9noGk0aa9kLMDBru_y9a2uxmo-?cq=1"&gt;Eric Miraglia&lt;/A&gt;&amp;nbsp;(Yahoo!): This session was a great look into YUI.&amp;nbsp; I've been using YUI in several of my demos, but I've only scratched the surface of what it's capable of.&amp;nbsp; Some good take-aways were the &lt;A class="" href="http://developer.yahoo.com/yui/compressor/"&gt;YUI compressor&lt;/A&gt;, css &lt;A class="" href="http://developer.yahoo.com/yui/base/"&gt;base&lt;/A&gt; and &lt;A class="" href="http://developer.yahoo.com/yui/reset/"&gt;reset&lt;/A&gt;, &lt;A class="" href="http://developer.yahoo.com/yui/grids/builder/"&gt;YUI CSS Grid&amp;nbsp;Builder&lt;/A&gt;, and the &lt;A class="" href="http://developer.yahoo.com/yui/profiler/"&gt;YUI profiler&lt;/A&gt;.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;Enterprise Comet: Real-Time, Real-Time, or Real-Time Web 2.0?&lt;/EM&gt; &lt;/STRONG&gt;by &lt;A class="" href="http://www.jroller.com/jonasjacobi/"&gt;Jonas Jacobi&lt;/A&gt;&amp;nbsp;(Kaazing):&amp;nbsp; This was pretty much a condensed version of the previous presentation.&amp;nbsp; We found out that they aren't showing any examples or demos because they are in private beta right now.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;jMaki as an AJAX Mashup Framework&lt;/EM&gt;&lt;/STRONG&gt; by &lt;A class="" href="http://weblogs.java.net/blog/arungupta/"&gt;Arun Gupta&lt;/A&gt;&amp;nbsp;(Sun): This was an interesting concept.&amp;nbsp; jMaki is a level of abstraction that allows objects from different JavaScript libraries to interact with each other.&amp;nbsp; I'm not sure if we could use this in ASP.NET, but it's still a very cool concept.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;Understanding the Top Web 2.0 Attack Vectors&lt;/EM&gt; &lt;/STRONG&gt;by Danny Allan (Watchfire): This was another session where there wasn't enough room for everyone.&amp;nbsp;&amp;nbsp;We didn't bother waiting in the hallway, as&amp;nbsp;we couldn't even hear the speaker.&amp;nbsp; I look forward to seeing this one on the DVD.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;Writing Large Web Applications Using the YUI&lt;/EM&gt;&lt;/STRONG&gt; by Christian Heilmann (Yahoo!): &amp;nbsp;I had to stand outside in the hallway just to listen to the speaker on this one.&amp;nbsp; It sounded like a great session, but I couldn't take notes or see what he was going over.&amp;nbsp; Hopefully I'll be able to see it when the DVD comes out.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;OpenAjax Gadgets &amp;amp; Widgets&lt;/EM&gt;&lt;/STRONG&gt; by Stewart Nickolas (IBM): This was my introduction to the OpenAjax Alliance.&amp;nbsp; They appear to have the same goal as jMaki, only this is an effort to get everyone to collaborate and contribute.&amp;nbsp; Stewart showed us a really slick mashup and gadget editor that was oriented toward developers.&amp;nbsp; I'm not sure where to find this editor, although I did find &lt;A class="" href="http://www.openajax.org/opensource.php"&gt;this&lt;/A&gt;.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Day 3:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;Now Playing: Desktop Apps in the Browser!&lt;/EM&gt;&lt;/STRONG&gt; by &lt;A href="http://www.coachwei.com/" target=_blank&gt;Coach Wei&lt;/A&gt; &amp;amp; Bob Buffone (Nexaweb): This was another mildly entertaining ping-pong keynote from&amp;nbsp;Nexaweb.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;DreamFace: The Ultimate Framework for Creating Personalized Web 2.0 Mashups&lt;/EM&gt;&lt;/STRONG&gt; by Olivier Poupeney (DreamFace): I think this was the first session where the speaker actually put together a demo in front of us.&amp;nbsp; Not only was this refreshing, it was a very informative.&amp;nbsp; The framework is looks impressive.&amp;nbsp; I might try&amp;nbsp;making a DreamFace gadget using some Atalasoft controls in the future.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;EM&gt;The Digital Black Belt’s Guide to Building Secure ASP.NET AJAX Applications&lt;/EM&gt;&lt;/STRONG&gt; by &lt;A class="" href="http://www.joeon.net/"&gt;Joe Stagner&lt;/A&gt; (Microsoft): This was the most informative and beneficial session that I went to these three days.&amp;nbsp; Some great take-aways were &lt;A class="" href="http://dawes.za.net/rogan/webscarab/"&gt;WebScarab&lt;/A&gt;, Internet Explorer 8's DOM explorer, ViewState Decoders, and &lt;A class="" href="http://www.contexteditor.org/"&gt;ConTEXT&lt;/A&gt;.&amp;nbsp; His slides can be found &lt;A class="" href="http://www.joeon.net/post/2008/03/My-AJAX-World-Downloads---AJAX-Security-amp%3b-AJAX-Patterns-Code-and-PowerPoints.aspx"&gt;here&lt;/A&gt;.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/21/atalasoft-at-ajaxworld-2008-east.aspx&amp;amp;;subject=Atalasoft+at+AJAXWorld+2008+East" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/21/atalasoft-at-ajaxworld-2008-east.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/21/atalasoft-at-ajaxworld-2008-east.aspx&amp;amp;;title=Atalasoft+at+AJAXWorld+2008+East" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/21/atalasoft-at-ajaxworld-2008-east.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/21/atalasoft-at-ajaxworld-2008-east.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/21/atalasoft-at-ajaxworld-2008-east.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/21/atalasoft-at-ajaxworld-2008-east.aspx&amp;amp;title=Atalasoft+at+AJAXWorld+2008+East" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/21/atalasoft-at-ajaxworld-2008-east.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/21/atalasoft-at-ajaxworld-2008-east.aspx&amp;amp;;title=Atalasoft+at+AJAXWorld+2008+East" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/21/atalasoft-at-ajaxworld-2008-east.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/21/atalasoft-at-ajaxworld-2008-east.aspx&amp;amp;;title=Atalasoft+at+AJAXWorld+2008+East&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/21/atalasoft-at-ajaxworld-2008-east.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=13523" width="1" height="1"&gt;</content><author><name>David Cilley</name><uri>http://www.atalasoft.com/cs/members/David+Cilley.aspx</uri></author><category term="AJAX" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/AJAX/default.aspx" /><category term="ASP.NET" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/ASP.NET/default.aspx" /><category term="AjaxWorld" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/AjaxWorld/default.aspx" /><category term="YUI" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/YUI/default.aspx" /></entry><entry><title>Passing DOM elements from one frame to another</title><link rel="alternate" type="text/html" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/14/passing-dom-elements-from-one-frame-to-another.aspx" /><id>http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/14/passing-dom-elements-from-one-frame-to-another.aspx</id><published>2008-03-15T01:35:00Z</published><updated>2008-03-15T01:35:00Z</updated><content type="html">&lt;P&gt;I came across an interesting problem with Internet Explorer and Safari this week:&lt;/P&gt;
&lt;P&gt;I wanted to take an arbitrary html element that had been created on a page, and send it to an iframe that was on the same page.&lt;/P&gt;
&lt;P&gt;I created a simple test page with an iframe, a div tag, and a button.&amp;nbsp; After a few lines of JavaScript, I had it working in FireFox.&amp;nbsp; When I tested it in IE 7, it gave me an "Invalid argument" exception, and didn't specify what was invalid.&amp;nbsp; This doesn't work in Safari either.&amp;nbsp; Opera handles it exactly like FireFox.&lt;/P&gt;
&lt;P&gt;After tinkering with it for a while, I thought it might have something to do with the ownerDocument property on the DOM element.&amp;nbsp;I thought that if I could change that property, that I may be able to&amp;nbsp;get it to work.&amp;nbsp;&amp;nbsp;You can't change this property directly... so I thought maybe by removing the object from the parent object, it would allow me to append it to another document.&amp;nbsp; This doesn't work either.&lt;/P&gt;
&lt;P&gt;Everything that I tried ended up not working, so as a last resort, I decided to create a copy of the&amp;nbsp;element on the child frame.&amp;nbsp; This works for me, but&amp;nbsp;could be missing some attributes that may be important to someone else.&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://www.atalasoft.com/cs/blogs/davidcilley/files/CrossFrameDomObjects_Test.html" target=_blank&gt;I made a test page&lt;/A&gt; that allows you to test both the direct appendChild method, and the&amp;nbsp;copy code below, while logging all errors that occur.&amp;nbsp; You can see that this test page works in both IE 7 and Safari when the checkbox is checked.&lt;/P&gt;
&lt;P&gt;Here is the code that I used to copy the element on the child frame's document:&lt;/P&gt;
&lt;DIV style="BORDER-RIGHT:#cc0000 4px solid;PADDING-RIGHT:6px;BORDER-TOP:#cc0000 4px solid;PADDING-LEFT:6px;PADDING-BOTTOM:6px;BORDER-LEFT:#cc0000 4px solid;PADDING-TOP:6px;BORDER-BOTTOM:#cc0000 4px solid;BACKGROUND-COLOR:#ffddaa;"&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';"&gt;&lt;SPAN style="COLOR:#708090;"&gt;// o : DOM object to copy&lt;BR&gt;// childDoc : document object from the child frame&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:black;"&gt;function CopyToChildObject(o, childDoc){&lt;BR&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR:#708090;"&gt;// create a new object on the other document&lt;BR&gt;&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp;var n = childDoc.createElement(o.tagName);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="COLOR:#708090;"&gt;// copy everything inside this tag&lt;BR&gt;&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp;n.innerHTML = o.innerHTML;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="COLOR:#708090;"&gt;// copy attributes &lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp; &amp;nbsp;for (var i in o){&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n.setAttribute(i, o.getAttribute(i));&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; catch (e){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;SPAN style="COLOR:#708090;"&gt;// do nothing with errors &lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR:#708090;"&gt;// copy style &lt;/SPAN&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp; for (var i in o.style){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n.style[i] = o.style[i];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (e){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR:#708090;"&gt;// do nothing with errors &lt;/SPAN&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp; return n;&lt;BR&gt;} &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/14/passing-dom-elements-from-one-frame-to-another.aspx&amp;amp;;subject=Passing+DOM+elements+from+one+frame+to+another" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/14/passing-dom-elements-from-one-frame-to-another.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/14/passing-dom-elements-from-one-frame-to-another.aspx&amp;amp;;title=Passing+DOM+elements+from+one+frame+to+another" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/14/passing-dom-elements-from-one-frame-to-another.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/14/passing-dom-elements-from-one-frame-to-another.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/14/passing-dom-elements-from-one-frame-to-another.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/14/passing-dom-elements-from-one-frame-to-another.aspx&amp;amp;title=Passing+DOM+elements+from+one+frame+to+another" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/14/passing-dom-elements-from-one-frame-to-another.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/14/passing-dom-elements-from-one-frame-to-another.aspx&amp;amp;;title=Passing+DOM+elements+from+one+frame+to+another" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/14/passing-dom-elements-from-one-frame-to-another.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/14/passing-dom-elements-from-one-frame-to-another.aspx&amp;amp;;title=Passing+DOM+elements+from+one+frame+to+another&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/14/passing-dom-elements-from-one-frame-to-another.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=13487" width="1" height="1"&gt;</content><author><name>David Cilley</name><uri>http://www.atalasoft.com/cs/members/David+Cilley.aspx</uri></author><category term="JavaScript" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/JavaScript/default.aspx" /><category term="IFrame" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/IFrame/default.aspx" /></entry><entry><title>Using YUI Animation to slide AJAX thumbnails in and out</title><link rel="alternate" type="text/html" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/03/using-yui-animation-to-slide-ajax-thumbnails-in-and-out.aspx" /><id>http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/03/using-yui-animation-to-slide-ajax-thumbnails-in-and-out.aspx</id><published>2008-03-03T16:58:00Z</published><updated>2008-03-03T16:58:00Z</updated><content type="html">&lt;P&gt;One of the easiest usability improvements that can be made to an imaging application, is the ability to hide the thumbnails from view when they are no longer needed.&amp;nbsp; Most users would prefer to see as much of the image, and as little of the application&amp;nbsp;on the screen as possible.&lt;/P&gt;
&lt;P&gt;Using &lt;A class="" href="http://developer.yahoo.com/yui/animation/"&gt;YUI's&amp;nbsp;Animation Utility&lt;/A&gt;, you can accomplish this task, while adding a little more feedback that something is happening.&lt;/P&gt;
&lt;P&gt;The thumbnails and the main viewer are placed in separate table cells, so that&amp;nbsp;the whole table can be fit to the width of the browser (a common requirement for imaging apps).&amp;nbsp;&amp;nbsp;The object that will be used for the animation, is a div tag (slideAnim in this case)&amp;nbsp;that holds the thumbnails, and clips the content if it's too large.&amp;nbsp;Keep in mind that height and width must be defined on all objects up the tree, if percentage based values need to be used.&lt;/P&gt;
&lt;P&gt;Here's how I did it:&lt;/P&gt;
&lt;P&gt;&amp;lt;!-- YUI Dependencies --&amp;gt;&lt;BR&gt;&amp;lt;script type="text/javascript" src="&lt;A href="http://yui.yahooapis.com/2.5.0/build/yahoo-dom-event/yahoo-dom-event.js%22%3E%3C/script"&gt;http://yui.yahooapis.com/2.5.0/build/yahoo-dom-event/yahoo-dom-event.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;BR&gt;&amp;lt;script type="text/javascript" src="&lt;A href="http://yui.yahooapis.com/2.5.0/build/animation/animation-min.js%22%3E%3C/script"&gt;http://yui.yahooapis.com/2.5.0/build/animation/animation-min.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;table style="width:100%;height:630px;"&amp;gt;&lt;BR&gt;&amp;lt;tr&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;td valign="top"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="slideAnim" style="overflow:hidden; width:202px; height:630px;"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cc1:webthumbnailviewer id="WebThumbnailViewer1" runat="server" width="200px" height="600px" viewerid="WebImageViewer1" thumbsize="160, 120"&amp;gt;&amp;lt;/cc1:webthumbnailviewer&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/div&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/td&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;td style="width:100%;" valign="top"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cc1:webimageviewer id="WebImageViewer1" runat="server" height="600px" width="100%" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/td&amp;gt;&lt;BR&gt;&amp;lt;/tr&amp;gt;&lt;BR&gt;&amp;lt;/table&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;button id="demo-run" onclick="return false;"&amp;gt;SlideIn/Out&amp;lt;/button&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;script type="text/javascript"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp; var _vis = true;&lt;BR&gt;&amp;nbsp;&amp;nbsp; var _outAttributes = {&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: { to: 0 }&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var _inAttributes = {&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: { to: 202 }&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// create animation objects&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var _animOut = new YAHOO.util.Anim('slideAnim', _outAttributes, 1, YAHOO.util.Easing.easeOut);&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var _animIn = new YAHOO.util.Anim('slideAnim', _inAttributes, 1, YAHOO.util.Easing.easeIn);&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// bind events&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;YAHOO.util.Event.on('demo-run', 'click', slide);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_animOut.onComplete.subscribe(onSlideOut);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_animIn.onComplete.subscribe(onSlideIn);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;function onSlideOut(){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _vis = false;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;function onSlideIn(){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _vis = true;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp; function slide(){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (_vis){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; slideOut();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; slideIn();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;function slideOut(){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _animOut.animate();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;function slideIn(){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _animIn.animate();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;lt;/script&amp;gt; &lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/03/using-yui-animation-to-slide-ajax-thumbnails-in-and-out.aspx&amp;amp;;subject=Using+YUI+Animation+to+slide+AJAX+thumbnails+in+and+out" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/03/using-yui-animation-to-slide-ajax-thumbnails-in-and-out.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/03/using-yui-animation-to-slide-ajax-thumbnails-in-and-out.aspx&amp;amp;;title=Using+YUI+Animation+to+slide+AJAX+thumbnails+in+and+out" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/03/using-yui-animation-to-slide-ajax-thumbnails-in-and-out.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/03/using-yui-animation-to-slide-ajax-thumbnails-in-and-out.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/03/using-yui-animation-to-slide-ajax-thumbnails-in-and-out.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/03/using-yui-animation-to-slide-ajax-thumbnails-in-and-out.aspx&amp;amp;title=Using+YUI+Animation+to+slide+AJAX+thumbnails+in+and+out" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/03/using-yui-animation-to-slide-ajax-thumbnails-in-and-out.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/03/using-yui-animation-to-slide-ajax-thumbnails-in-and-out.aspx&amp;amp;;title=Using+YUI+Animation+to+slide+AJAX+thumbnails+in+and+out" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/03/using-yui-animation-to-slide-ajax-thumbnails-in-and-out.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/03/using-yui-animation-to-slide-ajax-thumbnails-in-and-out.aspx&amp;amp;;title=Using+YUI+Animation+to+slide+AJAX+thumbnails+in+and+out&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2008/03/03/using-yui-animation-to-slide-ajax-thumbnails-in-and-out.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=13377" width="1" height="1"&gt;</content><author><name>David Cilley</name><uri>http://www.atalasoft.com/cs/members/David+Cilley.aspx</uri></author><category term="AJAX" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/AJAX/default.aspx" /><category term="JavaScript" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/JavaScript/default.aspx" /><category term="Thumbnails" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/Thumbnails/default.aspx" /><category term="Animation" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/Animation/default.aspx" /><category term="YUI" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/YUI/default.aspx" /></entry><entry><title>Slick Ajax Magnifier</title><link rel="alternate" type="text/html" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/15/slick-ajax-magnifier.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="592876" href="http://www.atalasoft.com/cs/blogs/davidcilley/attachment/12028.ashx" /><id>http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/15/slick-ajax-magnifier.aspx</id><published>2007-05-15T19:25:00Z</published><updated>2007-05-15T19:25:00Z</updated><content type="html">&lt;P&gt;&lt;IMG title="magnifier screenshot" style="WIDTH:179px;HEIGHT:114px;" height=114 alt="magnifier screenshot" src="http://www.atalasoft.com/cs/blogs/davidcilley/files/magnifier_screenshot.jpg" width=179 align=right&gt;Recently we had a customer ask if we had anything like our WinForms Magnifier MouseTool available on the WebForms side of things.&amp;nbsp; We get this question somewhat frequently, and it's always one of those features that seems to fall off the end of the development cycle to higher priority features.&amp;nbsp; The answer to this question has always been: "It's not inherantly supported, but&amp;nbsp;you could probably make your own by floating another WebImageViewer over the mouse position."&lt;/P&gt;
&lt;P&gt;I spent a little of my free time on it, and I've been able to confirm that this works.&amp;nbsp; Here are the steps that you need to take to get it to work:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a WebForm with two WebImageViewer controls on it, one as the main viewer, and one as the magnifier.&lt;/LI&gt;
&lt;LI&gt;Wrap the magnifier WebImageViewer in a div tag, give the div tag an ID, and set the style to display:none.&lt;/LI&gt;
&lt;LI&gt;Attach a JavaScript&amp;nbsp;MouseDownLeft event to the main viewer.&lt;/LI&gt;
&lt;LI&gt;In the MouseDownLeft event, attach JavaScript MouseMove and MouseUp events to both of the viewers, and set the style of the magnifier div to display:none.&lt;/LI&gt;
&lt;LI&gt;In the MouseMove events, set the position of the magnifier div to the position of the mouse - half the size of the magnifier.&lt;/LI&gt;
&lt;LI&gt;In the MouseUp event, detach the MouseMove and MouseUp events (by setting them to a blank function) and set the magnifier div style to display:none.&lt;/LI&gt;
&lt;LI&gt;The final step is to load the same image into both of the WebImageViewer controls, BestFit the main viewer, and keep the magnifier at zoom level 1.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;I have attached a VS 2005 demo solution that shows how all of this is put together.&amp;nbsp;This is a file system based web application with dll.refresh files pointing to the install location of DotImage.&amp;nbsp; If you do not have DotImage installed at that location, you will need to remove and re-add your references to the Atalasoft dll's.&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/15/slick-ajax-magnifier.aspx&amp;amp;;subject=Slick+Ajax+Magnifier" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/15/slick-ajax-magnifier.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/15/slick-ajax-magnifier.aspx&amp;amp;;title=Slick+Ajax+Magnifier" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/15/slick-ajax-magnifier.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/15/slick-ajax-magnifier.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/15/slick-ajax-magnifier.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/15/slick-ajax-magnifier.aspx&amp;amp;title=Slick+Ajax+Magnifier" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/15/slick-ajax-magnifier.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/15/slick-ajax-magnifier.aspx&amp;amp;;title=Slick+Ajax+Magnifier" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/15/slick-ajax-magnifier.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/15/slick-ajax-magnifier.aspx&amp;amp;;title=Slick+Ajax+Magnifier&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/15/slick-ajax-magnifier.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=12028" width="1" height="1"&gt;</content><author><name>David Cilley</name><uri>http://www.atalasoft.com/cs/members/David+Cilley.aspx</uri></author><category term="AJAX" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/AJAX/default.aspx" /><category term="JavaScript" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/JavaScript/default.aspx" /><category term="ASP.NET" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/ASP.NET/default.aspx" /></entry><entry><title>Presentation: Introduction to AJAX in ASP.NET</title><link rel="alternate" type="text/html" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/02/presentation-introduction-to-ajax-in-asp-net.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="410384" href="http://www.atalasoft.com/cs/blogs/davidcilley/attachment/11939.ashx" /><id>http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/02/presentation-introduction-to-ajax-in-asp-net.aspx</id><published>2007-05-02T18:50:00Z</published><updated>2007-05-02T18:50:00Z</updated><content type="html">&lt;P&gt;I'd like to thank everyone that attended my presentation on AJAX for the &lt;A class="" href="http://wmassdotnet.org/cs/" target=_blank&gt;Western Mass .NET Users Group&lt;/A&gt; last night.&amp;nbsp; I enjoyed presenting to the group and speaking with most of you.&lt;/P&gt;
&lt;P&gt;Topics that were covered were:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;What is AJAX?&lt;/LI&gt;
&lt;LI&gt;AJAX in .NET with IFrames&lt;/LI&gt;
&lt;LI&gt;ASP.NET AJAX Library&lt;/LI&gt;
&lt;LI&gt;ASP.NET AJAX Extensions&lt;/LI&gt;
&lt;LI&gt;ASP.NET AJAX Toolkit&lt;/LI&gt;
&lt;LI&gt;AJAX Annotations Demo&lt;/LI&gt;
&lt;LI&gt;Hero &amp;amp; Villain Card Builder &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If you have any questions about the material covered, please don't hesitate to contact me. I'd be happy to answer any questions you might have.&lt;/P&gt;
&lt;P&gt;For reference, I have attached my slides, enjoy!&amp;nbsp;(&lt;EM&gt;Visual Studio 2005 and &lt;A class="" href="http://ajax.asp.net/downloads/default.aspx" target=_blank&gt;ASP.NET AJAX Extensions required&lt;/A&gt;&lt;/EM&gt;)&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/02/presentation-introduction-to-ajax-in-asp-net.aspx&amp;amp;;subject=Presentation%3a+Introduction+to+AJAX+in+ASP.NET" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/02/presentation-introduction-to-ajax-in-asp-net.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/02/presentation-introduction-to-ajax-in-asp-net.aspx&amp;amp;;title=Presentation%3a+Introduction+to+AJAX+in+ASP.NET" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/02/presentation-introduction-to-ajax-in-asp-net.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/02/presentation-introduction-to-ajax-in-asp-net.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/02/presentation-introduction-to-ajax-in-asp-net.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/02/presentation-introduction-to-ajax-in-asp-net.aspx&amp;amp;title=Presentation%3a+Introduction+to+AJAX+in+ASP.NET" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/02/presentation-introduction-to-ajax-in-asp-net.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/02/presentation-introduction-to-ajax-in-asp-net.aspx&amp;amp;;title=Presentation%3a+Introduction+to+AJAX+in+ASP.NET" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/02/presentation-introduction-to-ajax-in-asp-net.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/02/presentation-introduction-to-ajax-in-asp-net.aspx&amp;amp;;title=Presentation%3a+Introduction+to+AJAX+in+ASP.NET&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/05/02/presentation-introduction-to-ajax-in-asp-net.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=11939" width="1" height="1"&gt;</content><author><name>David Cilley</name><uri>http://www.atalasoft.com/cs/members/David+Cilley.aspx</uri></author><category term="AJAX" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/AJAX/default.aspx" /><category term="ASP.NET" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/ASP.NET/default.aspx" /><category term="IFrame" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/IFrame/default.aspx" /></entry><entry><title>Atalasoft at AjaxWorld NYC 2007</title><link rel="alternate" type="text/html" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/22/ajaxworld-nyc-2007.aspx" /><id>http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/22/ajaxworld-nyc-2007.aspx</id><published>2007-03-22T15:18:00Z</published><updated>2007-03-22T15:18:00Z</updated><content type="html">&lt;p&gt;&lt;a href="http://www.atalasoft.com/cs/blogs/loufranco/default.aspx" class="" target="_blank"&gt;Lou&lt;/a&gt; and I recently returned from the &lt;a href="http://www.ajaxworldexpo.com/" class="" target="_blank"&gt;AjaxWorld Conference &amp;amp; Expo&lt;/a&gt; in NYC.&amp;nbsp; Most of the sessions I attended were very informative, some were advertorials, some were advertisements, and a few were actually laughable.&amp;nbsp; This AjaxWorld conference was not run as well as the last one I attended.&amp;nbsp; The biggest problems I saw with this conference were:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Lack of communication for wireless access. Last year they had the login info on the main presentation slides before every session... this would have been a great idea.&amp;nbsp; We didn't even know that they offered it until the second day.&lt;/li&gt;
&lt;li&gt;Wireless access quality was minimal, and non existent in several of the session rooms.&lt;/li&gt;
&lt;li&gt;Session rooms were way too small in most cases, I had to sit on the floor for several of the sessions.&lt;/li&gt;
&lt;li&gt;Projector screens were usually in the corner, making it nearly impossible for anyone after the 3rd or 4th row to follow along.&lt;/li&gt;
&lt;li&gt;At least one of the presenters I was interested in didn't show up, and we weren't notified until after all the other sessions had started.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;All session slides were provided on an unmarked cd-r (which I discovered when I got back to Atalasoft)&amp;nbsp; I had assumed that it was a demo or something, like all of the other cd's provided.&lt;/li&gt;
&lt;li&gt;They did not appear to enforce any of the badges, everything was open to everyone. (except meals)&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Sessions I attended:&lt;br&gt;Day 1:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;AJAX, the Browser Application Platform&lt;/b&gt;&lt;/i&gt; by &lt;a href="http://www.crockford.com/" class="" target="_blank"&gt;Douglas Crockford&lt;/a&gt; (Yahoo!):&lt;b&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/b&gt;Douglas gave a very well&amp;nbsp;thought out keynote to start off this conference.&amp;nbsp; He basically described how we got to where we are now with AJAX, and discussed several of the failed attempts at making the web more interactive (like Java Applets).&amp;nbsp; He also explained what's driving this technology, pointed out several flaws with&amp;nbsp;current technologies, and gave a great overview on where we're currently at with AJAX.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;JavaScript Performance: Speeding up Your AJAX Apps&lt;/b&gt;&lt;/i&gt; by &lt;a href="http://www.freewebs.com/ryanstout/index.htm" class="" target="_blank"&gt;Ryan Stout&lt;/a&gt;:&amp;nbsp; This session was by far, the most beneficial topic that I&amp;nbsp;went to.&amp;nbsp; Ryan gave an in depth view of several things you can do to speed up your JavaScript.&amp;nbsp; A few important points that he brought up were profiling with FireBug, avoiding page re-flows, using setTimeOut on long operations to allow the browser time to breathe, compressing js files with gzip, and setting expiration dates on js files to make sure that they are cached.&amp;nbsp; You should take a look at &lt;a href="http://www.freewebs.com/ryanstout/ajaxworldresources.htm" class="" target="_blank"&gt;his slides&lt;/a&gt; if you are writing any performance hungry JavaScript.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;Enterprise Web 2.0 - Programming with Levers, Dials and maybe Switches&lt;/b&gt;&lt;/i&gt; by &lt;a href="http://www.coachwei.com/" target="_blank"&gt;Coach Wei&lt;/a&gt; &amp;amp; Bob Buffone (Nexaweb): This ping-pong keynote compared using Nexaweb for Web 2.0 in enterprise to using a lever.&amp;nbsp; They had an interesting demo that transparently switched from thin client to thick client when the amount of data increased to more than the thin client could handle.&amp;nbsp; It's an interesting concept, but the demo that I saw didn't show the scroll bars correctly, and didn't seem to maintain state when it switched clients.&amp;nbsp; They promised that it was easy as a lever, but they never told us exactly how easy it really was.&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Day 2:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;Scaling AJAX: The Promise and the Challenge of Modern Web Development&lt;/b&gt;&lt;/i&gt; by Bret Taylor (Google):&amp;nbsp; This was an extremely informative keynote.&amp;nbsp; Bret described many of the hurdles that were encountered during the development of AJAX apps like Google Maps.&amp;nbsp; He also went into current projects, and predictions on what the future holds for AJAX.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;The User Is the Killer App. Empower Them!&lt;/b&gt;&lt;/i&gt; by Luis Derechin (JackBe)&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;Google Gadgets and Componentized Websites&lt;/b&gt;&lt;/i&gt; by &lt;a href="http://www.adamsah.net/%7Easah/" class="" target="_blank"&gt;Adam Sah&lt;/a&gt; (Google):&lt;b&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/b&gt;This session was very well done.&amp;nbsp; Adam gave an in depth view of Google Gadgets, how they were made, and how people are using them.&amp;nbsp; Basically speaking, the gadgets are IFrames of content offered by just about anyone.&amp;nbsp; Many of the gadgets in Google's Gadget library are provided by outside developers.&amp;nbsp; This really got me thinking about what could be useful inside a Google Gadget, and how I could help the gadget community.&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;Q&amp;amp;A session with Google&lt;/b&gt;&lt;/i&gt; by Bret Taylor, Adam Sah, Scott Blum&lt;br&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;The Face of Enterprise 2.0&lt;/b&gt;&lt;/i&gt; by Ric Smith (Oracle):&amp;nbsp; This keynote was canceled by the presenter because his laptop black screened.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;Delivering Data To Your AJAX Solutions&lt;/b&gt;&lt;/i&gt; by Bob Zurek&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;Web Vector Graphics &amp;amp; Dojo: Draw This!&lt;/b&gt;&lt;/i&gt; by &lt;a href="http://www.dylanschiemann.com/" target="_blank"&gt;Dylan Schiemann&lt;/a&gt;: This was an overview of vector based graphics using the Dojo.gfx toolkit.&amp;nbsp; It looked like it's easier to use Dojo,&amp;nbsp;instead&amp;nbsp;of native browser offerings such as VML and canvas, as they wrap all of the functionality into one framework.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;Microsoft AJAX Library Architecture – A Deep Dive&lt;/b&gt;&lt;/i&gt; by &lt;a href="http://nimad.wordpress.com/" class="" target="_blank"&gt;Nima Dilmaghani&lt;/a&gt; (Microsoft):&amp;nbsp; I had been looking forward to this&amp;nbsp;session the whole day.&amp;nbsp; Nima gave a quick overview of&amp;nbsp;the Microsoft AJAX Library, and emphasized that the library could be used on other platforms besides ASP.NET.&amp;nbsp; This session lost steam quickly as the presenter appeared to be unprepared.&amp;nbsp; He did offer some useful links at the end of the presentation.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Day 3:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;i&gt;AJAX in the Balance&lt;/i&gt;&lt;/b&gt; by &lt;a href="http://blogs.msdn.com/brada/" class="" target="_blank"&gt;Brad Abrams &lt;/a&gt;(Microsoft):&lt;b&gt;&lt;i&gt; &lt;/i&gt;&lt;/b&gt;This was one of the main&amp;nbsp;keynotes I was interested in.&amp;nbsp; Brad showed us a demo web site that he created to sell dice.&amp;nbsp; He used ASP.NET AJAX to stop the full page refresh, and add autocomplete to the search box.&amp;nbsp; He also showed us how that demo worked with PHP and Linux, on a Mac.&amp;nbsp; He gave us a preview of JavaScript intellisense in Orcas (which looks really sweet btw).&amp;nbsp; The 'wow' part of the keynote was when he showed off a WPFE demo that had turning pages, music, and video.&amp;nbsp; Very impressive.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;i&gt;'HDUX' – High Definition User Experience with Flex &amp;amp; Apollo&lt;/i&gt;&lt;/b&gt; by &lt;a href="http://coenraets.org/" class="" target="_blank"&gt;Christophe Coenraets&lt;/a&gt; (Adobe): &amp;nbsp;This&amp;nbsp;keynote was another impressive one that wowed the audience with an Ebay on the desktop using Apollo.&amp;nbsp;He also showed another page turning demo with biological transparancies as the subject matter.&amp;nbsp; This was just as impressive as the previous keynote's demo.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;Step by Step - Helmi Open Source RIA Platform&lt;/b&gt;&lt;/i&gt; by Juho Risku (Helmi):&amp;nbsp;The initial speaker was pretty good, it was the second presenter that appeared to be too nervous.&amp;nbsp;&amp;nbsp;He couldn't speak loud enough for everyone to hear.&amp;nbsp; He also didn't explain what he was doing while he was typing out his demo&amp;nbsp;and he couldn't get his demo to work until the very end of the presentation.&amp;nbsp; I think about half of the total time was spent in silence.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;JavaScript Puzzlers - Is An IDE the Fifth Wheel or the Sixth Sense&lt;/b&gt;&lt;/i&gt; by Mike Aizatsky (JetBrains):&amp;nbsp; This keynote was one of the most entertaining ones. Mike started out by handing out a quiz with a bunch of JavaScript puzzles.&amp;nbsp; These puzzles&amp;nbsp;were focused on&amp;nbsp;quirks of the JavaScript language, and were very informative.&amp;nbsp; He included the audience in discussion of quirks like the difference between == and ===.&amp;nbsp; The hardest puzzle that he offered was number 4:&lt;br&gt;&lt;blockquote&gt;What will be displayed in each case?&lt;br&gt;alert("0" == 0);&lt;br&gt;alert("1" == 1);&lt;br&gt;alert("0x10" == 0x10);&lt;br&gt;alert("010" == 010);&lt;br&gt;&lt;/blockquote&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;i&gt;JSON: Making the 'X' in AJAX Superfluous&lt;/i&gt;&lt;/b&gt; by &lt;a href="http://www.crockford.com/" class="" target="_blank"&gt;Douglas Crockford&lt;/a&gt; (Yahoo!): This was another great talk by Douglas.&amp;nbsp; He offered a broad overview of &lt;a href="http://www.json.org/" class="" target="_blank"&gt;JSON&lt;/a&gt;, how it worked, and why you should use it for data transfer.&amp;nbsp; The Q&amp;amp;A session at the end got a little out of hand, as some of the attendees asked questions that Douglas had nothing to do with (such as development of Internet Explorer)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;i&gt;Performance-Tune Your AJAX Application&lt;/i&gt;&lt;/b&gt; by Bob Buffone (Nexaweb):&amp;nbsp; This was a fairly informative session on JavaScript performance.&amp;nbsp; Some key topics Bob covered were using Dojo to combine JavaScript files on the fly, and profiling in browsers besides FireFox.&lt;/li&gt;&lt;/ul&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/22/ajaxworld-nyc-2007.aspx&amp;amp;;subject=Atalasoft+at+AjaxWorld+NYC+2007" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/22/ajaxworld-nyc-2007.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/22/ajaxworld-nyc-2007.aspx&amp;amp;;title=Atalasoft+at+AjaxWorld+NYC+2007" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/22/ajaxworld-nyc-2007.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/22/ajaxworld-nyc-2007.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/22/ajaxworld-nyc-2007.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/22/ajaxworld-nyc-2007.aspx&amp;amp;title=Atalasoft+at+AjaxWorld+NYC+2007" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/22/ajaxworld-nyc-2007.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/22/ajaxworld-nyc-2007.aspx&amp;amp;;title=Atalasoft+at+AjaxWorld+NYC+2007" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/22/ajaxworld-nyc-2007.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/22/ajaxworld-nyc-2007.aspx&amp;amp;;title=Atalasoft+at+AjaxWorld+NYC+2007&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/22/ajaxworld-nyc-2007.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=11718" width="1" height="1"&gt;</content><author><name>David Cilley</name><uri>http://www.atalasoft.com/cs/members/David+Cilley.aspx</uri></author><category term="AJAX" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/AJAX/default.aspx" /><category term="JavaScript" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/JavaScript/default.aspx" /><category term="ASP.NET" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/ASP.NET/default.aspx" /><category term="AjaxWorld" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/AjaxWorld/default.aspx" /></entry><entry><title>IE7 DXImageTransform and PNG transparency problem</title><link rel="alternate" type="text/html" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/14/ie7-dximagetransform-and-png-transparency-problem.aspx" /><id>http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/14/ie7-dximagetransform-and-png-transparency-problem.aspx</id><published>2007-03-14T14:35:00Z</published><updated>2007-03-14T14:35:00Z</updated><content type="html">&lt;P&gt;Recently I was tasked with creating a spiffy demo for our new AJAX Annotations control and I ran across an interesting problem. For reference, I am creating a demo that looks and behaves much like the &lt;A class="" href="http://www.atalasoft.com/ajaxviewer/" target=_blank&gt;AJAX Multipage Tiff Demo&lt;/A&gt;, with all the transparent PNG goodness that we can now take advantage of in IE7.&lt;/P&gt;
&lt;P&gt;Since the default&amp;nbsp;doctype&amp;nbsp;in VS 2005&amp;nbsp;is XHTML 1.0 Transitional, I decided now is a good time for me see how easy or difficult&amp;nbsp;using this doctype can be.&amp;nbsp; Primarily I have been sticking to HTML 4.0, because it's a heck of a lot easier to get your nested tables fitting to percentage based height and width.&lt;/P&gt;
&lt;P&gt;Switching to this doctype caused a few minor problems, but the biggest one that I noticed was this:&lt;BR&gt;&lt;A href="http://www.atalasoft.com/cs/photos/cilleyimages/picture11670.aspx" target=_blank&gt;&lt;IMG src="http://www.atalasoft.com/cs/photos/cilleyimages/images/11670/original.aspx" border=0&gt;&lt;/A&gt;&lt;BR&gt;What you are seeing here is the bottom right corner of the image I am attempting to use like a modal dialog background (the demo mentioned above shows how this is used).&amp;nbsp; This image is originally 150x150 pixels, and has been stretched to fit the browser's available area.&lt;/P&gt;
&lt;P&gt;It's supposed to look like this:&lt;BR&gt;&lt;A href="http://www.atalasoft.com/cs/photos/cilleyimages/picture11669.aspx" target=_blank&gt;&lt;IMG src="http://www.atalasoft.com/cs/photos/cilleyimages/images/11669/original.aspx" border=0&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;So now I bet you're wondering the same thing I was.&amp;nbsp; What am I doing wrong on the page that's causing this?&amp;nbsp; The first thing I thought, was the doctype change.&amp;nbsp; This didn't fix the problem.&amp;nbsp; Then I figured that I must be using the old IE transparent PNG hack that's I've covered in previous posts.&amp;nbsp; Nope, not using it in this app.&amp;nbsp; However, I did find a DXImageTransform&amp;nbsp;filter in one of the underlying IFrames.&amp;nbsp; Once I got rid of the DXImageTransform, the problem went away.&lt;/P&gt;
&lt;P&gt;In my tests,&amp;nbsp;regardless of doctype, this problem can show up if you are using any DXImageTransform filters on any object on any of the&amp;nbsp;frames currently loaded into the browser window.&amp;nbsp; It seems to show up less if the PNG images are not overlapping any other objects, although I haven't been able to pinpoint exactly which cases are ok.&lt;/P&gt;
&lt;P&gt;I have created a &lt;A class="" href="http://www.atalasoft.com/cs/blogs/davidcilley/files/IE7DXImageTransformPNG.html"&gt;test html page that demonstrates this problem&lt;/A&gt;.&amp;nbsp; When you first load the page, the PNG image shows up correctly.&amp;nbsp; Once you click one of the buttons (using IE7 and Windows XP) the PNG image becomes blurred on the bottom and the right of the image.&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/14/ie7-dximagetransform-and-png-transparency-problem.aspx&amp;amp;;subject=IE7+DXImageTransform+and+PNG+transparency+problem" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/14/ie7-dximagetransform-and-png-transparency-problem.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/14/ie7-dximagetransform-and-png-transparency-problem.aspx&amp;amp;;title=IE7+DXImageTransform+and+PNG+transparency+problem" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/14/ie7-dximagetransform-and-png-transparency-problem.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/14/ie7-dximagetransform-and-png-transparency-problem.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/14/ie7-dximagetransform-and-png-transparency-problem.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/14/ie7-dximagetransform-and-png-transparency-problem.aspx&amp;amp;title=IE7+DXImageTransform+and+PNG+transparency+problem" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/14/ie7-dximagetransform-and-png-transparency-problem.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/14/ie7-dximagetransform-and-png-transparency-problem.aspx&amp;amp;;title=IE7+DXImageTransform+and+PNG+transparency+problem" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/14/ie7-dximagetransform-and-png-transparency-problem.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/14/ie7-dximagetransform-and-png-transparency-problem.aspx&amp;amp;;title=IE7+DXImageTransform+and+PNG+transparency+problem&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2007/03/14/ie7-dximagetransform-and-png-transparency-problem.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=11668" width="1" height="1"&gt;</content><author><name>David Cilley</name><uri>http://www.atalasoft.com/cs/members/David+Cilley.aspx</uri></author><category term="JavaScript" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/JavaScript/default.aspx" /><category term="PNG" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/PNG/default.aspx" /><category term="Internet Explorer" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/Internet+Explorer/default.aspx" /></entry><entry><title>Multi-page Document Printing on the Web using a Thin Client Approach</title><link rel="alternate" type="text/html" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/09/19/multi-page-document-printing-on-the-web-using-a-thin-client-approach.aspx" /><id>http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/09/19/multi-page-document-printing-on-the-web-using-a-thin-client-approach.aspx</id><published>2006-09-19T14:04:00Z</published><updated>2006-09-19T14:04:00Z</updated><content type="html">&lt;P&gt;One of the most sought after features for developers using our products is that of printing multi-page document images through the web using a thin client/AJAX approach.&amp;nbsp; There are a set of fundamental problems with doing this:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Printing can only be done using the browser's print dialog, as there is no direct way to interface with the client's printer through a web page. 
&lt;LI&gt;Each browser likes to print a little bit differently than the next. (margins, size, etc) 
&lt;LI&gt;Print options are not accessible via JavaScript.&amp;nbsp; (window.print() is all that's allowed) 
&lt;LI&gt;Printing from a frame or iframe separately doesn't seem to be possible, so another popup is necessary, unless the parent page is occupied by the content to be printed. 
&lt;LI&gt;The entire&amp;nbsp;page range&amp;nbsp;to be printed must be resampled on the server side so it will fit in the available space.&amp;nbsp; Some browsers can fix this with automatic image resizing, but in general the documents become illegible without a scale to gray resample. 
&lt;LI&gt;The image(s) can only be printed at 96 DPI because browsers only print what's on the screen, and screen resolution is 96DPI. 
&lt;LI&gt;The entire page range&amp;nbsp;must be downloaded by the client before it can be printed. 
&lt;LI&gt;For every page printed, there will need to be a page break or equivalent spacing, because the browser will just print the next page on whatever space it has left on the current page.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;As you can see, there are a good deal of hurdles to deal with for something that seems so simple.&amp;nbsp; While taking all of this into account, it is possible to write a few web forms that could tackle this.&amp;nbsp; The one hurdle that I didn't really want to tackle was the page break spacing between images, as it seemed impossible to make this work with most browsers.&amp;nbsp; We recently had a customer contact us who was dealing with this issue by using the style attribute "PAGE-BREAK-AFTER: always".&amp;nbsp; This was the last piece of the puzzle that I needed (although it doesn't seem to work in Safari).&lt;/P&gt;
&lt;P&gt;I created a user control that creates an HtmlTable on the fly, placing a series of image tags using this style attribute, and setting the src attribute referring to another web form that resamples each image so that it fits on&amp;nbsp;letter paper size (8.5in x11in @ 96 DPI). This works great in IE 6.0, FireFox 1.5, and Opera 9.&amp;nbsp; This almost works in Safari, and I'll post an update if I find a way to get it to work for sure.&lt;/P&gt;
&lt;P&gt;Until then, here are the links to the code: (you will need at least DotImage Photo Pro to get this to work "out of the box")&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://www.atalasoft.com/download/WebImagePrintDemo.zip"&gt;VS 2003&lt;/A&gt;&amp;nbsp;To use this zip, you will need to create a new Web Application, reference the necessary Atalasoft&amp;nbsp;dll's,&amp;nbsp;and add the files in the zip to your new app.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.atalasoft.com/download/WebImagePrintDemo2005.zip"&gt;VS 2005&lt;/A&gt;&amp;nbsp;This is a file system based web application with dll.refresh files pointing to the install location of DotImage.&amp;nbsp; If you do not have DotImage installed at that location, you will need to remove and re-add your references to the Atalasoft dll's.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;*edit: Added VS 2005 version, and general instructions&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/09/19/multi-page-document-printing-on-the-web-using-a-thin-client-approach.aspx&amp;amp;;subject=Multi-page+Document+Printing+on+the+Web+using+a+Thin+Client+Approach" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/09/19/multi-page-document-printing-on-the-web-using-a-thin-client-approach.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/09/19/multi-page-document-printing-on-the-web-using-a-thin-client-approach.aspx&amp;amp;;title=Multi-page+Document+Printing+on+the+Web+using+a+Thin+Client+Approach" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/09/19/multi-page-document-printing-on-the-web-using-a-thin-client-approach.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/09/19/multi-page-document-printing-on-the-web-using-a-thin-client-approach.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/09/19/multi-page-document-printing-on-the-web-using-a-thin-client-approach.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/09/19/multi-page-document-printing-on-the-web-using-a-thin-client-approach.aspx&amp;amp;title=Multi-page+Document+Printing+on+the+Web+using+a+Thin+Client+Approach" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/09/19/multi-page-document-printing-on-the-web-using-a-thin-client-approach.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/09/19/multi-page-document-printing-on-the-web-using-a-thin-client-approach.aspx&amp;amp;;title=Multi-page+Document+Printing+on+the+Web+using+a+Thin+Client+Approach" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/09/19/multi-page-document-printing-on-the-web-using-a-thin-client-approach.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/09/19/multi-page-document-printing-on-the-web-using-a-thin-client-approach.aspx&amp;amp;;title=Multi-page+Document+Printing+on+the+Web+using+a+Thin+Client+Approach&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/09/19/multi-page-document-printing-on-the-web-using-a-thin-client-approach.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=10877" width="1" height="1"&gt;</content><author><name>David Cilley</name><uri>http://www.atalasoft.com/cs/members/David+Cilley.aspx</uri></author><category term="Printing" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/Printing/default.aspx" /><category term="AJAX" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/AJAX/default.aspx" /><category term="JavaScript" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/JavaScript/default.aspx" /><category term="ASP.NET" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/ASP.NET/default.aspx" /><category term="Multipage Tiff" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/Multipage+Tiff/default.aspx" /></entry><entry><title>Internet Explorer won't stop making click noises!</title><link rel="alternate" type="text/html" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/04/internet-explorer-won-t-stop-making-click-noises.aspx" /><id>http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/04/internet-explorer-won-t-stop-making-click-noises.aspx</id><published>2006-08-04T17:29:00Z</published><updated>2006-08-04T17:29:00Z</updated><content type="html">&lt;P&gt;The biggest annoyance with asynchronous postbacks through&amp;nbsp;an iframe is probably the infamous "click" noises that Internet Explorer makes when you load a page.&amp;nbsp; I've turned sounds for that event off (in the sounds section of the control panel) a long time ago, and it's easy to forget about it once it's gone.&lt;/P&gt;
&lt;P&gt;It turns out that we're not the only ones that have this clicking going on.&amp;nbsp; The Yahoo! Mail Beta Team blogged about it too, check it out: &lt;A href="http://updates.mail.yahoo.com/blog/archives/27"&gt;http://updates.mail.yahoo.com/blog/archives/27&lt;/A&gt;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/04/internet-explorer-won-t-stop-making-click-noises.aspx&amp;amp;;subject=Internet+Explorer+won%27t+stop+making+click+noises!" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/04/internet-explorer-won-t-stop-making-click-noises.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/04/internet-explorer-won-t-stop-making-click-noises.aspx&amp;amp;;title=Internet+Explorer+won%27t+stop+making+click+noises!" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/04/internet-explorer-won-t-stop-making-click-noises.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/04/internet-explorer-won-t-stop-making-click-noises.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/04/internet-explorer-won-t-stop-making-click-noises.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/04/internet-explorer-won-t-stop-making-click-noises.aspx&amp;amp;title=Internet+Explorer+won%27t+stop+making+click+noises!" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/04/internet-explorer-won-t-stop-making-click-noises.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/04/internet-explorer-won-t-stop-making-click-noises.aspx&amp;amp;;title=Internet+Explorer+won%27t+stop+making+click+noises!" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/04/internet-explorer-won-t-stop-making-click-noises.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/04/internet-explorer-won-t-stop-making-click-noises.aspx&amp;amp;;title=Internet+Explorer+won%27t+stop+making+click+noises!&amp;amp;;top=1" target="_blank" title = "Post http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/04/internet-explorer-won-t-stop-making-click-noises.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://www.atalasoft.com/cs/aggbug.aspx?PostID=10618" width="1" height="1"&gt;</content><author><name>David Cilley</name><uri>http://www.atalasoft.com/cs/members/David+Cilley.aspx</uri></author><category term="Internet Explorer" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/Internet+Explorer/default.aspx" /><category term="IFrame" scheme="http://www.atalasoft.com/cs/blogs/davidcilley/archive/tags/IFrame/default.aspx" /></entry><entry><title>AJAX Thumbnails and On Demand Tiling Unleashed!</title><link rel="alternate" type="text/html" href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/03/ajax-thumbnails-and-on-demand-tiling-unleashed.aspx" /><id>http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/08/03/ajax-thumbnails-and-on-demand-tiling-unleashed.aspx</id><published>2006-08-03T15:11:00Z</published><updated>2006-08-03T15:11:00Z</updated><content type="html">&lt;P&gt;It's been a while since I last spoke about anything on this blog... the main reason for this is we've been hard at work getting the DotImage 4.0 release out.&amp;nbsp; Now that it's out, I'd like to show you the two coolest additions to the our AJAX WebControls. We've added a new AJAX thumbnail control, and we've completely redeveloped the WebImageViewer control.&lt;/P&gt;
&lt;P&gt;After many requests for live scrolling and panning,&amp;nbsp;our original control would use a delayed on demand scroll (where only the part of the image visible was updated when the control was finished scrolling), we can now scroll the image like you would in windows.&amp;nbsp;&amp;nbsp;It splits the image up into tiles, and it loads the tiles when they are scrolled to (OnDemand).&amp;nbsp; This technology was also used in our new thumbnail control, for the same load on demand thumbnailing.&amp;nbsp; The end result is really slick.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.atalasoft.com/ajaxviewer/" target=_blank&gt;&lt;IMG height=182 src="http://www.atalasoft.com/products/dotimage/thinclient/ajaxdemo_th.png" width=200 align=right border=0&gt;&lt;/A&gt;We currently have two demos active and public on the Atalasoft web site.&amp;nbsp; The first one that I'm going to show you is a slick combination of the two controls in action.&amp;nbsp; The &lt;A href="http://www.atalasoft.com/ajaxviewer/" target=_blank&gt;AJAX Multipage Tiff Demo&lt;/A&gt; uses code snippets that I've blogged about in the past, and takes advantage of the PNG transparency fix I spoke of in my last post. Here are links to those blog posts if you're interested:&lt;BR&gt;&lt;BR&gt;&lt;A href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/03/21/9805.aspx"&gt;Paging Through Multipage Tiffs using RemoteInvoke&lt;/A&gt;&lt;BR&gt;&lt;A href="http://www.atalasoft.com/cs/blogs/davidcilley/archive/2006/05/10/10028.aspx"&gt;PNG Transparency in Internet Explorer Revisited&lt;/A&gt;&lt;BR&gt;&lt;BR&gt;This demo shows how you can open multipage tiff images over the web, save changes, export them to pdf, switch pages, zoom, pan, crop, redact, deskew, despeckle, remove noise, rotate, and fit the image to the viewer all without posting back.&amp;nbsp; It also adds a little extra&amp;nbsp;UI feedback to make the user experience better.&amp;nbsp; This can all be done using &lt;A href="http://www.atalasoft.com/products/dotimage/documentimaging/" target=_blank&gt;DotImage Document Imaging v4.0&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.atalasoft.com/products/dotimage/demos/ajaxphotoviewer/" target=_blank&gt;&lt;IMG height=167 src="http://www.atalasoft.com/Images/screenshots/webcontrols_demo.jpg" width=200 align=right border=0&gt;&lt;/A&gt;The next demo I'll be going over is our multi-control demo converted to our latest version.&amp;nbsp; The &lt;A href="http://www.atalasoft.com/products/dotimage/demos/ajaxphotoviewer/" target=_blank&gt;AJAX Photo Viewer Demo&lt;/A&gt; shows how you can use two of these WebImageViewer controls together for live scrolling and panning, and it also demonstrates many of our commands, all done using our AJAX method of RemoteInvoking.&amp;nbsp; Try dragging the preview selection rectangle around, it'll update your scroll position while your dragging it.&lt;BR&gt;&lt;BR&gt;In this demo, you can upload images, zoom, fit the image, pan, crop, blur, unsharp mask, emboss, change threshold, pixelate, flip, rotate, add a drop shadow, change the color depth, and even draw rectangles, circles, text, and overlay images with transparency.&amp;nbsp; This also takes advantage eliminating full page postbacks.&lt;/P&gt;
&lt;P&gt;Please let me know if you would like to see any other demos using these two controls in more specific scenarios.&amp;nbsp; I'd be happy to make a few more if time permits, thanks! :)&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this