<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Pure-Essence.Net &#187; submit is not a function</title>
	<atom:link href="http://pure-essence.net/tag/submit-is-not-a-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://pure-essence.net</link>
	<description>You have to visit this geeky girl&#039;s blog.</description>
	<lastBuildDate>Fri, 10 Feb 2012 11:26:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='pure-essence.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Pure-Essence.Net &#187; submit is not a function</title>
		<link>http://pure-essence.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://pure-essence.net/osd.xml" title="Pure-Essence.Net" />
	<atom:link rel='hub' href='http://pure-essence.net/?pushpress=hub'/>
		<item>
		<title>Javascript Error: submit is not a function</title>
		<link>http://pure-essence.net/2008/10/15/javascript-error-submit-is-not-a-function/</link>
		<comments>http://pure-essence.net/2008/10/15/javascript-error-submit-is-not-a-function/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 18:13:35 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[non php code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[javascript error]]></category>
		<category><![CDATA[submit is not a function]]></category>

		<guid isPermaLink="false">http://regretless.com/?p=1333</guid>
		<description><![CDATA[Just my luck and I ran into the dreaded submit is not a function javascript error. Here&#8217;s the scenario. While coding javascript along, you get a form via id or name on your html page and calls the submit() function on it. You think it should just behave as expected (submits the form) instead nothing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=1333&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just my luck and I ran into the dreaded submit is not a function javascript error.</p>
<p>Here&#8217;s the scenario.</p>
<p>While coding javascript along, you get a form via id or name on your html page and calls the submit() function on it. You think it should just behave as expected (submits the form) instead nothing happens and in firebug, you get a submit is not a function error. You are like WTF is going on? You start to wonder if you remembered the syntax correctly so you do some research and all the pages tell you yes it&#8217;s just submit() and nothing else.</p>
<p>Finally you start to search on the error &#8220;submit is not a function&#8221; you get to <a href="http://www.chovy.com/javascript/javascript-error-submit-is-not-a-function/">this page</a> and you learned:</p>
<blockquote><p>
The reason was the statement &#8220;formObj.submit();&#8221; in the javascript was colliding (resulting in ambiguity within the browser) with the form button, which was also named &#8220;submit&#8221;.
</p></blockquote>
<p>So just rename the element within the form tag that is named &#8220;submit&#8221; will fix the problem.</p>
<p>Here&#8217;s an example.</p>
<p><b>HTML:</b><br />
<pre class="brush: xml; wrap-lines: false;">
&lt;form id=&quot;search&quot;&gt;&lt;input name=&quot;something&quot; /&gt;&lt;input type=&quot;submit&quot; name=&quot;submit&quot; /&gt;&lt;/form&gt;
</pre></p>
<p><b>Javascript:</b><br />
<pre class="brush: jscript; wrap-lines: false;">
function submitForm() {
  document.getElementById('search').submit();
}
</pre><br />
gives &#8220;submit is not a function&#8221; error.</p>
<p><strong>Change HTML to:</strong><br />
<pre class="brush: xml; wrap-lines: false;">
&lt;form id=&quot;search&quot;&gt;&lt;input name=&quot;something&quot; /&gt;&lt;input type=&quot;submit&quot; name=&quot;NOT_SUBMIT&quot; /&gt;&lt;/form&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/1333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/1333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/1333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/1333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/1333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/1333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/1333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/1333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/1333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/1333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/1333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/1333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/1333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/1333/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=1333&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2008/10/15/javascript-error-submit-is-not-a-function/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
	</channel>
</rss>
