<?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: Changing type attribute in IE</title>
	<atom:link href="http://arjansnaterse.nl/changing-type-attribute-in-ie/feed" rel="self" type="application/rss+xml" />
	<link>http://arjansnaterse.nl/changing-type-attribute-in-ie</link>
	<description></description>
	<lastBuildDate>Thu, 22 Jul 2010 09:23:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: test03202009</title>
		<link>http://arjansnaterse.nl/changing-type-attribute-in-ie/comment-page-1#comment-219</link>
		<dc:creator>test03202009</dc:creator>
		<pubDate>Thu, 01 Oct 2009 06:29:30 +0000</pubDate>
		<guid isPermaLink="false">http://arjansnaterse.nl/?p=43#comment-219</guid>
		<description>try newObject.select()</description>
		<content:encoded><![CDATA[<p>try newObject.select()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arjan</title>
		<link>http://arjansnaterse.nl/changing-type-attribute-in-ie/comment-page-1#comment-3</link>
		<dc:creator>Arjan</dc:creator>
		<pubDate>Tue, 14 Apr 2009 10:13:17 +0000</pubDate>
		<guid isPermaLink="false">http://arjansnaterse.nl/?p=43#comment-3</guid>
		<description>Hi Mont,

I&#039;m not sure if I get your problem right, but what you can do is extend the function with an extra parameter, namely the object who fires this function. It should be something like this:

function changeInputType(currentObject, oldObject, oType) {

    ...... here the same function

    // Add this
    if(currentObject == oldObject) {
        newObject.focus();
    }
    else {
        currentObject.focus();
    }

}


If this is not exactly what you&#039;re looking for or it doesn&#039;t work, please contact me via the contact form.

Good luck!</description>
		<content:encoded><![CDATA[<p>Hi Mont,</p>
<p>I&#8217;m not sure if I get your problem right, but what you can do is extend the function with an extra parameter, namely the object who fires this function. It should be something like this:</p>
<p>function changeInputType(currentObject, oldObject, oType) {</p>
<p>    &#8230;&#8230; here the same function</p>
<p>    // Add this<br />
    if(currentObject == oldObject) {<br />
        newObject.focus();<br />
    }<br />
    else {<br />
        currentObject.focus();<br />
    }</p>
<p>}</p>
<p>If this is not exactly what you&#8217;re looking for or it doesn&#8217;t work, please contact me via the contact form.</p>
<p>Good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mont</title>
		<link>http://arjansnaterse.nl/changing-type-attribute-in-ie/comment-page-1#comment-5</link>
		<dc:creator>Mont</dc:creator>
		<pubDate>Tue, 14 Apr 2009 03:23:37 +0000</pubDate>
		<guid isPermaLink="false">http://arjansnaterse.nl/?p=43#comment-5</guid>
		<description>Have an issue with the new object that is created not being able to .focus()

I am using your function on the onFocus event of some input fields, but the newObject.focus() seems to set focus to the top of the page in IE7.

If the user was not already focussed on the oldObject this wouldn&#039;t be an issue, but as it effectively takes focus away from the field when the &quot;onFocus&quot; its a bit messy.

thoughts ?</description>
		<content:encoded><![CDATA[<p>Have an issue with the new object that is created not being able to .focus()</p>
<p>I am using your function on the onFocus event of some input fields, but the newObject.focus() seems to set focus to the top of the page in IE7.</p>
<p>If the user was not already focussed on the oldObject this wouldn&#8217;t be an issue, but as it effectively takes focus away from the field when the &#8220;onFocus&#8221; its a bit messy.</p>
<p>thoughts ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pablo.chacon.luna</title>
		<link>http://arjansnaterse.nl/changing-type-attribute-in-ie/comment-page-1#comment-4</link>
		<dc:creator>pablo.chacon.luna</dc:creator>
		<pubDate>Tue, 02 Dec 2008 23:57:32 +0000</pubDate>
		<guid isPermaLink="false">http://arjansnaterse.nl/?p=43#comment-4</guid>
		<description>it works!
thanks</description>
		<content:encoded><![CDATA[<p>it works!<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seblouis</title>
		<link>http://arjansnaterse.nl/changing-type-attribute-in-ie/comment-page-1#comment-2</link>
		<dc:creator>Seblouis</dc:creator>
		<pubDate>Fri, 21 Nov 2008 18:12:13 +0000</pubDate>
		<guid isPermaLink="false">http://arjansnaterse.nl/?p=43#comment-2</guid>
		<description>Perfect !
Thanks</description>
		<content:encoded><![CDATA[<p>Perfect !<br />
Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
