<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Javascript: Finding the Focused Element</title> <atom:link href="http://trentrichardson.com/2008/05/21/javascript-finding-the-focused-element/feed/" rel="self" type="application/rss+xml" /><link>http://trentrichardson.com/2008/05/21/javascript-finding-the-focused-element/</link> <description>practical web design &#38; development</description> <lastBuildDate>Wed, 16 May 2012 12:15:11 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: trent</title><link>http://trentrichardson.com/2008/05/21/javascript-finding-the-focused-element/comment-page-1/#comment-5594</link> <dc:creator>trent</dc:creator> <pubDate>Mon, 16 Jun 2008 23:27:35 +0000</pubDate> <guid
isPermaLink="false">http://trentrichardson.com/?p=95#comment-5594</guid> <description>Thanks for the code Zev.  I will definitely look at integrating 3 into the next version.#2 doesn&#039;t need an option, just simply pass true into that function removePrompt() should work: removePrompt(true,&#039;escape&#039;,jqi); should work.  Now you can use the regular callback.  I may look at changing it to this as it seems more appropriate.As for #1 I will look into getting that to work,.. looks like it will be fun :)  Thanks for the code and suggestion!</description> <content:encoded><![CDATA[<p>Thanks for the code Zev.  I will definitely look at integrating 3 into the next version.</p><p>#2 doesn&#8217;t need an option, just simply pass true into that function removePrompt() should work: removePrompt(true,&#8217;escape&#8217;,jqi); should work.  Now you can use the regular callback.  I may look at changing it to this as it seems more appropriate.</p><p>As for #1 I will look into getting that to work,.. looks like it will be fun :)  Thanks for the code and suggestion!</p> ]]></content:encoded> </item> <item><title>By: Zev Spitz</title><link>http://trentrichardson.com/2008/05/21/javascript-finding-the-focused-element/comment-page-1/#comment-5593</link> <dc:creator>Zev Spitz</dc:creator> <pubDate>Mon, 16 Jun 2008 22:03:11 +0000</pubDate> <guid
isPermaLink="false">http://trentrichardson.com/?p=95#comment-5593</guid> <description>1) IE has a document.activElement property, but that isn&#039;t cross-browser.
Although, perhaps the following is a better solution: trap the blur events for the first (if shift is pressed) and last (if shift is not pressed) inputs in the prompt, and returning the focus to the first and last elements respectively.2) If we&#039;re talking about the new version, I have modified impromptu to allow a callback when removing the prompt with the escape key:
Add the following member to the ImproptuDefaults object (line 22):escape:function() {}Change line 82 as follows:
if (kC == Esc) {removePrompt();o.escape();}3) As I mentioned in a comment to a previous blog, the focus option doesn&#039;t do anything under IE. Apparently, the focus can only be set after the buttons are visible.
I&#039;ve worked around this by setting the focus in the load function.</description> <content:encoded><![CDATA[<p>1) IE has a document.activElement property, but that isn&#8217;t cross-browser.<br
/> Although, perhaps the following is a better solution: trap the blur events for the first (if shift is pressed) and last (if shift is not pressed) inputs in the prompt, and returning the focus to the first and last elements respectively.</p><p>2) If we&#8217;re talking about the new version, I have modified impromptu to allow a callback when removing the prompt with the escape key:<br
/> Add the following member to the ImproptuDefaults object (line 22):</p><p>escape:function() {}</p><p>Change line 82 as follows:<br
/> if (kC == Esc) {removePrompt();o.escape();}</p><p>3) As I mentioned in a comment to a previous blog, the focus option doesn&#8217;t do anything under IE. Apparently, the focus can only be set after the buttons are visible.<br
/> I&#8217;ve worked around this by setting the focus in the load function.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/8 queries in 0.006 seconds using disk: basic
Object Caching 230/230 objects using disk: basic

Served from: trentrichardson.com @ 2012-05-17 00:27:38 -->
