<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Beutelevision &#187; javascript</title>
	<atom:link href="http://beutelevision.com/blog2/tags/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://beutelevision.com/blog2</link>
	<description>by Thomas Beutel</description>
	<lastBuildDate>Fri, 14 Oct 2011 19:13:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='beutelevision.com' port='80' path='/blog2/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Result of expression &#8216;document.forms[0].submit&#8217; [[object HTMLInputElement]] is not a function.</title>
		<link>http://beutelevision.com/blog2/2009/09/15/result-of-expression-document-forms0-submit-object-htmlinputelement-is-not-a-function/</link>
		<comments>http://beutelevision.com/blog2/2009/09/15/result-of-expression-document-forms0-submit-object-htmlinputelement-is-not-a-function/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 21:34:48 +0000</pubDate>
		<dc:creator>Thomas Beutel</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://beutelevision.com/blog2/2009/09/15/result-of-expression-document-forms0-submit-object-htmlinputelement-is-not-a-function/</guid>
		<description><![CDATA[I was trying to add a small delay into my form submission like so:
&#60;form ... onsubmit="setTimeout('document.forms[0].submit()',2000);return false;"&#62;
but everytime I tried it, I got the following error:
Result of expression 'document.forms[0].submit' [[object HTMLInputElement]] is not a function.
This one had me stumped, until I realized what it was telling me&#8230; that my submit button was named &#8220;submit&#8221;.
&#60;input type="submit" [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to add a small delay into my form submission like so:</p>
<p><code>&lt;form ... onsubmit="setTimeout('document.forms[0].submit()',2000);return false;"&gt;</code></p>
<p>but everytime I tried it, I got the following error:</p>
<p><code>Result of expression 'document.forms[0].submit' [[object HTMLInputElement]] is not a function.</code></p>
<p>This one had me stumped, until I realized what it was telling me&#8230; that my submit button was named &#8220;submit&#8221;.</p>
<p><code>&lt;input type="submit" name="submit" id="Button1" /&gt;</code></p>
<p>I changed the name of the submit button and the problem went away.</p>
<p><code>&lt;input type="submit" name="button1" id="Button1" /&gt;</code></p>
<p>Basically, Javascript provides a &#8220;convenience&#8221; by adding the names of the form inputs as children of the form. But this then clashes with preset function names, like the submit() function.</p>
]]></content:encoded>
			<wfw:commentRss>http://beutelevision.com/blog2/2009/09/15/result-of-expression-document-forms0-submit-object-htmlinputelement-is-not-a-function/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

