Getting the value of the selected option tag in a select box
<p>I have an select box</p>

<pre><code>&lt;select name="type1"&gt;
   &lt;option value="1"&gt;Laser Printer&lt;/option&gt;
   &lt;option value="2"&gt;Line Printer&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>Now I have a button with id <code>#New1</code> when this button gets clicked I need to display  the value between the option tag that was selected. Eg if Laser Printer is selected I need to get Laser Printer and not 1</p>

<p>My code thus far</p>

<p><code>alert($("select[name=type1]:selected").val().text());</code> but this returns undefined</p>
