Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Thanks for all the information everyone. I should have mentioned that I was using FF3.5 and testing using the Firebug Console. I would load the page and then execute <code>$('form')</code> in Firebug. It would return nothing every time when I had the <code>name</code> attribute set to <code>action</code>. After changing it to something else, executing that same line of code in the Firebug Console would work.</p> <p>After reading everyone's posts, I edited my HTML by adding a <code>&lt;script&gt;</code> element to the <code>&lt;head&gt;</code> section:</p> <pre><code>&lt;head&gt; &lt;title&gt;Test&lt;/title&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.0r4/build/reset/reset-min.css" /&gt; &lt;script type="text/javascript"&gt; $(function(){ alert($('form').length); }); &lt;/script&gt; &lt;/head&gt; </code></pre> <p>This worked completely fine. So I guess my error was in my testing methods. Using <code>$('form').length</code> in the Firebug Console yields nothing. What I should have used this line instead: <code>$(function(){$('form');});</code>$(function(){$('form');})` I didn't think I would need to check if the document was ready first before trying to select the form element using the Firebug Console; <strong>I was wrong.</strong></p> <p><strong>MORAL OF THE STORY:</strong> Even in Firebug, you still need to check if the document is ready before selecting the element.</p> <p>What still bothers me though is that when the <code>name</code> attribute is <strong>not</strong> <code>action</code>, then my original testing method works with the Firebug Console. So perhaps the real question should have been: <strong>What's Firebug's beef with the value <code>action</code> for the <code>name</code> attribute on an <code>&lt;input&gt;</code> element?</strong> Ah well, we'll save that for another time.</p> <p>Thanks everyone for the help! All your posts lead me to this final realization, it's too bad I can't give everyone a checkmark but I will give everyone a vote!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload