<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-171924705653813582.post7423839106879433184..comments</id><updated>2009-12-03T23:51:31.620+02:00</updated><title type='text'>Comments on It Could Be Done!: Restoring Lost Focus in the Update Panel with Auto...</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://couldbedone.blogspot.com/feeds/7423839106879433184/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default?start-index=26&amp;max-results=25'/><author><name>Yuriy Solodkyy</name><uri>http://www.blogger.com/profile/04926659302956943479</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-9164163130730983777</id><published>2009-01-22T06:03:00.000+02:00</published><updated>2009-01-22T06:03:00.000+02:00</updated><title type='text'>I encountered the same exception as mentioned in t...</title><content type='html'>I encountered the same exception as mentioned in the first comment. I commented out the line &lt;BR/&gt;...&lt;BR/&gt;}&lt;BR/&gt;// targetControl.focus();&lt;BR/&gt;if(focusTarget){&lt;BR/&gt;...&lt;BR/&gt;&lt;BR/&gt;It worked!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/9164163130730983777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/9164163130730983777'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1232596980000#c9164163130730983777' title=''/><author><name>Jing</name><uri>http://www.blogger.com/profile/00701892215626207223</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-728207645835395790</id><published>2009-01-22T00:45:00.000+02:00</published><updated>2009-01-22T00:45:00.000+02:00</updated><title type='text'>Thanks - I had a situation where I added a dropdow...</title><content type='html'>Thanks - I had a situation where I added a dropdown field to a page using AJAX, then set focus to that field using a setTimeout. But as soon as I moved the mouse or pressed a key, focus was lost. Adding this part of your code right before the field.focus() command fixed it for me:&lt;BR/&gt;&lt;BR/&gt;if (typeof(field.contentEditable) !== "undefined") {&lt;BR/&gt; field.contentEditable = false;&lt;BR/&gt;}&lt;BR/&gt;&lt;BR/&gt;However, I still don't understand why that would change the behavior.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/728207645835395790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/728207645835395790'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1232577900000#c728207645835395790' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-8616051260470852694</id><published>2009-01-05T14:19:00.000+02:00</published><updated>2009-01-05T14:19:00.000+02:00</updated><title type='text'>Thanks a lot!</title><content type='html'>Thanks a lot!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/8616051260470852694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/8616051260470852694'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1231157940000#c8616051260470852694' title=''/><author><name>Galiyashka</name><uri>http://www.blogger.com/profile/15142612392445869656</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-3163175375341686299</id><published>2008-12-17T16:22:00.000+02:00</published><updated>2008-12-17T16:22:00.000+02:00</updated><title type='text'>hello,the script worked perfectly for me, except f...</title><content type='html'>hello,&lt;BR/&gt;&lt;BR/&gt;the script worked perfectly for me, except for one thing. After gaining the focus back on my last textbox, i can type in it but it doesn't seem to be active. I have to click inside it for the Enter key to work, for example.&lt;BR/&gt;&lt;BR/&gt;any idea how to solve this?&lt;BR/&gt;thanks</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/3163175375341686299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/3163175375341686299'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1229523720000#c3163175375341686299' title=''/><author><name>Marc</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-1372167733302350172</id><published>2008-11-28T22:41:00.000+02:00</published><updated>2008-11-28T22:41:00.000+02:00</updated><title type='text'>Here is a link to help you set the starting positi...</title><content type='html'>Here is a link to help you set the starting position in the textbox to the end.&lt;BR/&gt;&lt;BR/&gt;&lt;A HREF="http://www.velocityreviews.com/forums/t70952-set-focus-and-cursor-at-end-of-text.html" REL="nofollow"&gt;good luck&lt;/A&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/1372167733302350172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/1372167733302350172'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1227904860000#c1372167733302350172' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-3744624638526504213</id><published>2008-11-17T12:09:00.000+02:00</published><updated>2008-11-17T12:09:00.000+02:00</updated><title type='text'>Thank you all...it really helped me</title><content type='html'>Thank you all...it really helped me</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/3744624638526504213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/3744624638526504213'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1226916540000#c3744624638526504213' title=''/><author><name>bhushan</name><uri>http://www.blogger.com/profile/07624319980029446463</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-2497227902552625236</id><published>2008-11-11T01:37:00.000+02:00</published><updated>2008-11-11T01:37:00.000+02:00</updated><title type='text'>Thanks Yuriy, potentially tricky problem solved ve...</title><content type='html'>Thanks Yuriy, potentially tricky problem solved very easily thanks to your code!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/2497227902552625236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/2497227902552625236'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1226360220000#c2497227902552625236' title=''/><author><name>Rich</name><uri>http://www.blogger.com/profile/15615256653882056737</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-826515971436086317</id><published>2008-10-29T12:57:00.000+02:00</published><updated>2008-10-29T12:57:00.000+02:00</updated><title type='text'>It is great! It helps me in FireFox 3. But it does...</title><content type='html'>It is great! It helps me in FireFox 3. But it doesn't work in Google Chrome. Any idea? Please advise. &lt;BR/&gt;&lt;BR/&gt;Thanks in advance.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/826515971436086317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/826515971436086317'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1225277820000#c826515971436086317' title=''/><author><name>Elise</name><uri>http://shoutoutlounge.com</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-3461304476942331359</id><published>2008-09-02T21:41:00.000+03:00</published><updated>2008-09-02T21:41:00.000+03:00</updated><title type='text'>I found that if you if you change the script in th...</title><content type='html'>I found that if you if you change the script in the function 'focusHandler' from:&lt;BR/&gt;&lt;BR/&gt;document.activeElement = e.originalTarget&lt;BR/&gt;&lt;BR/&gt;to:&lt;BR/&gt;&lt;BR/&gt;e.originalTarget.focus = true;&lt;BR/&gt;&lt;BR/&gt;The Firefox compatibility issues go away for me.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/3461304476942331359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/3461304476942331359'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1220380860000#c3461304476942331359' title=''/><author><name>Craig M Oliver</name><uri>http://www.blogger.com/profile/01991792824731180562</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-1593602148201624585</id><published>2008-08-14T16:48:00.000+03:00</published><updated>2008-08-14T16:48:00.000+03:00</updated><title type='text'>Good article! But, if performance is not an issue,...</title><content type='html'>Good article! But, if performance is not an issue, how about using setTimeout to cause a brief delay, and then set focus to desired the control on the popup? See for an example:&lt;BR/&gt;&lt;BR/&gt;http://www.aspdotnetcodes.com/ModalPopup_Postback.aspx</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/1593602148201624585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/1593602148201624585'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1218721680000#c1593602148201624585' title=''/><author><name>Harish</name><uri>http://www.aspdotnetcodes.com/ModalPopup_Postback.aspx</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-2104674300658729557</id><published>2008-06-24T15:50:00.000+03:00</published><updated>2008-06-24T15:50:00.000+03:00</updated><title type='text'>Felipe, sample uses MS AJAX library scripts and yo...</title><content type='html'>Felipe, sample uses MS AJAX library scripts and you must load script via asp:ScriptManager.  If you don't want to use MS AJAX libary you need to replace everything withpure JavaScript.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/2104674300658729557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/2104674300658729557'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1214311800000#c2104674300658729557' title=''/><author><name>Yuriy Solodkyy</name><uri>http://www.blogger.com/profile/04926659302956943479</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03430031748913176409'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-7906401952245667100</id><published>2008-06-23T20:00:00.000+03:00</published><updated>2008-06-23T20:00:00.000+03:00</updated><title type='text'>Yuriy Solodkyy the full link is there below: &lt; a h...</title><content type='html'>Yuriy Solodkyy the full link is there below:&lt;BR/&gt;&lt;BR/&gt; &lt; a href="javascript:__doPostBack('ctl00$SIGContentPlaceHolder$mainControl$ppCorrectStock$lbtnPartitionateNumbering','')" cclass="linkFerramentas" title="Partir Numeração" iid="ctl00_SIGContentPlaceHolder_mainControl_ppCorrectStock_lbtnPartitionateNumbering"&gt;Partir Numeração&lt; / a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/7906401952245667100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/7906401952245667100'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1214240400000#c7906401952245667100' title=''/><author><name>Miguel</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-8782791043944424904</id><published>2008-06-23T19:22:00.000+03:00</published><updated>2008-06-23T19:22:00.000+03:00</updated><title type='text'>Great article! It appears to work well in the exam...</title><content type='html'>Great article! It appears to work well in the example, but in my project I copy and pasted your script and it couldn't find the 'Sys' object. Could you tell me what is it???</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/8782791043944424904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/8782791043944424904'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1214238120000#c8782791043944424904' title=''/><author><name>Felipe</name><uri>http://www.blogger.com/profile/00937016188591780965</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-1265973098725883438</id><published>2008-06-20T18:11:00.000+03:00</published><updated>2008-06-20T18:11:00.000+03:00</updated><title type='text'>but how does click on &lt;a href="..." cause async po...</title><content type='html'>but how does click on &amp;lt;a href="..." cause async postback that refresh updatepanel?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/1265973098725883438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/1265973098725883438'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1213974660000#c1265973098725883438' title=''/><author><name>Yuriy Solodkyy</name><uri>http://www.blogger.com/profile/04926659302956943479</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03430031748913176409'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-2101780761509132972</id><published>2008-06-20T16:25:00.000+03:00</published><updated>2008-06-20T16:25:00.000+03:00</updated><title type='text'>This scripts was awesome!But what if i want to do ...</title><content type='html'>This scripts was awesome!&lt;BR/&gt;&lt;BR/&gt;But what if i want to do the same thing, but I click on a &lt; a href="xpto" &gt;xpto&lt; /a&gt; ?&lt;BR/&gt;&lt;BR/&gt;I tryed the following &lt;BR/&gt;&lt;BR/&gt;function focusControl(targetControl) {&lt;BR/&gt;    if (Sys.Browser.agent === Sys.Browser.InternetExplorer) {&lt;BR/&gt;        var focusTarget = targetControl;&lt;BR/&gt;        if (focusTarget &amp;&amp; (typeof(focusTarget.contentEditable) !== "undefined")) {&lt;BR/&gt;            oldContentEditableSetting = focusTarget.contentEditable;&lt;BR/&gt;            focusTarget.contentEditable = false;&lt;BR/&gt;        }&lt;BR/&gt;        else {&lt;BR/&gt;            focusTarget = null;&lt;BR/&gt;        }&lt;BR/&gt;        decideAction(targetControl);&lt;BR/&gt;        &lt;BR/&gt;        if (focusTarget) {&lt;BR/&gt;            focusTarget.contentEditable = oldContentEditableSetting;&lt;BR/&gt;        }&lt;BR/&gt;    }&lt;BR/&gt;    else {&lt;BR/&gt;        decideAction(targetControl);&lt;BR/&gt;    }&lt;BR/&gt;}&lt;BR/&gt;&lt;BR/&gt;function decideAction(targetControl){&lt;BR/&gt;    if(targetControl.tagName === "A") {&lt;BR/&gt;//        targetControl.click(); - This was commented because when used the button was clicked twice&lt;BR/&gt;    }&lt;BR/&gt;    else {&lt;BR/&gt;        targetControl.focus();&lt;BR/&gt;    }&lt;BR/&gt;}&lt;BR/&gt;&lt;BR/&gt;but as you see on my commented code there is the reason why it didn't work!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/2101780761509132972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/2101780761509132972'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1213968300000#c2101780761509132972' title=''/><author><name>Miguel</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-731966218499502630</id><published>2008-06-18T12:31:00.000+03:00</published><updated>2008-06-18T12:31:00.000+03:00</updated><title type='text'>Hey Yuriy,Just want to help out here as I was face...</title><content type='html'>Hey Yuriy,&lt;BR/&gt;&lt;BR/&gt;Just want to help out here as I was faced with a problem and your post helped me.&lt;BR/&gt;&lt;BR/&gt;Firefox 3!&lt;BR/&gt;&lt;BR/&gt;I had this software that lives in an IFRAME. Apparently scriptmanager.setfocus(control) will cause Firefox3 to JUMP to the textbox by scrolling it upwards until the textbox (that you want to set focus to) is right at the bottom of the page. This obviously sucks for an IFRAME apps(firefox2 and IE7 did not have this issue).&lt;BR/&gt;&lt;BR/&gt;So it took a while until I found your blog post and used your JS file .. it worked. And I thought I should share this with you. &lt;BR/&gt;&lt;BR/&gt;Thanks again :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/731966218499502630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/731966218499502630'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1213781460000#c731966218499502630' title=''/><author><name>Lasker</name><uri>http://www.blogger.com/profile/03389912902835171777</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-3913619114861861670</id><published>2008-05-05T18:24:00.000+03:00</published><updated>2008-05-05T18:24:00.000+03:00</updated><title type='text'>This article's gonna save my butt too!  Thanks for...</title><content type='html'>This article's gonna save my butt too!  Thanks for publishing :D</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/3913619114861861670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/3913619114861861670'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1210001040000#c3913619114861861670' title=''/><author><name>Johnny</name><uri>http://www.blogger.com/profile/17779433052265854828</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-7769960330007692634</id><published>2008-04-30T18:14:00.000+03:00</published><updated>2008-04-30T18:14:00.000+03:00</updated><title type='text'>Thanks for this article, resolved issues with my a...</title><content type='html'>Thanks for this article, resolved issues with my app. There is one issue though, which is, when you type something on the first input box and tab out it doesn't set focus to the next input box until I press tab key one more time. i.e. for the first input box I have to use tab key twice, &lt;BR/&gt;Let me know what could be the problem.&lt;BR/&gt;Thanks, &lt;BR/&gt;Waj</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/7769960330007692634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/7769960330007692634'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1209568440000#c7769960330007692634' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-4302239442330591013</id><published>2008-04-01T10:42:00.000+03:00</published><updated>2008-04-01T10:42:00.000+03:00</updated><title type='text'>How could I use this code to set focus on a differ...</title><content type='html'>How could I use this code to set focus on a differnt control?&lt;BR/&gt;&lt;BR/&gt;is there a way to send a contol's id?&lt;BR/&gt;&lt;BR/&gt;thanks&lt;BR/&gt;&lt;BR/&gt;BG</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/4302239442330591013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/4302239442330591013'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1207035720000#c4302239442330591013' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-1144719361844484364</id><published>2008-03-30T12:08:00.000+03:00</published><updated>2008-03-30T12:08:00.000+03:00</updated><title type='text'>unfortunately I don't know a solution for this, an...</title><content type='html'>unfortunately I don't know a solution for this, and i can just hope that user will notice wrong text typed in.  &lt;BR/&gt;&lt;BR/&gt;However, in general I prefer sending data items to client and updating controls without recreating them with UpdatePanel.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/1144719361844484364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/1144719361844484364'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1206868080000#c1144719361844484364' title=''/><author><name>Yuriy Solodkyy</name><uri>http://www.blogger.com/profile/04926659302956943479</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03430031748913176409'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-1089121533286803709</id><published>2008-03-28T04:22:00.000+02:00</published><updated>2008-03-28T04:22:00.000+02:00</updated><title type='text'>My issues is it adds the curser before any of the ...</title><content type='html'>My issues is it adds the curser before any of the copy that already resides in the textbox, is there a way to get it select the textbox?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/1089121533286803709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/1089121533286803709'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1206670920000#c1089121533286803709' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-3972118450811317527</id><published>2008-03-19T20:34:00.000+02:00</published><updated>2008-03-19T20:34:00.000+02:00</updated><title type='text'>Great article saved my butt ;)THanksRico</title><content type='html'>Great article saved my butt ;)&lt;BR/&gt;THanks&lt;BR/&gt;Rico</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/3972118450811317527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/3972118450811317527'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1205951640000#c3972118450811317527' title=''/><author><name>Rico</name><uri>http://www.blogger.com/profile/15670955509330026679</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-187300722746855037</id><published>2007-11-27T07:33:00.000+02:00</published><updated>2007-11-27T07:33:00.000+02:00</updated><title type='text'>Nice Article. Solved my problem</title><content type='html'>Nice Article. Solved my problem</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/187300722746855037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/187300722746855037'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1196141580000#c187300722746855037' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-1223982192922958275</id><published>2007-08-10T23:19:00.000+03:00</published><updated>2007-08-10T23:19:00.000+03:00</updated><title type='text'>Hi, once again thank you for noting about possible...</title><content type='html'>Hi, once again thank you for noting about possible exceptions.  I would like to use WebForm_CanFocus function to find out if it is possible to set focus to the given control. However, I am not yet sure how I can make ASP.NET include required scripts.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/1223982192922958275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/1223982192922958275'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1186777140000#c1223982192922958275' title=''/><author><name>Yuriy Solodkyy</name><uri>http://www.blogger.com/profile/04926659302956943479</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03430031748913176409'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-171924705653813582.post-7647976555243192056</id><published>2007-08-10T15:11:00.000+03:00</published><updated>2007-08-10T15:11:00.000+03:00</updated><title type='text'>It is good article. it will raise exception when a...</title><content type='html'>It is good article. it will raise exception when any button is disbled after clicked. so after miner changes it will work fine.&lt;BR/&gt;if(newFocused.disabled == false)&lt;BR/&gt;            {                 focusControl(newFocused);&lt;BR/&gt;            }</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/7647976555243192056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/171924705653813582/7423839106879433184/comments/default/7647976555243192056'/><link rel='alternate' type='text/html' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html?showComment=1186747860000#c7647976555243192056' title=''/><author><name>harikesh</name><uri>http://www.blogger.com/profile/10398819735745590952</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://couldbedone.blogspot.com/2007/08/restoring-lost-focus-in-update-panel.html' ref='tag:blogger.com,1999:blog-171924705653813582.post-7423839106879433184' source='http://www.blogger.com/feeds/171924705653813582/posts/default/7423839106879433184' type='text/html'/></entry></feed>