HTML form button and input not formatting correctly

I am having some difficulty getting an input button to work.  

In the code below, when I include the button inside the form id="searchform", it aligns correctly as I am looking for, but it does not trigger the onclick action when pressed.

When I include the button outside the form id="searchform", it aligns incorrectly, but it does trigger the onclick action when pressed.

I figure that I need to either make the form react to the button click when the button is inside the form element, or figure out a better way to align the button when I include it outside the form element.

Here is the code:

    <div id="searchbox" align="right">
      <form id="searchform">      	
        <button class="i_magnifying_glass icon small green" value="Go" 
                    onclick="if($('#add_nox').val()!='')loadProperty($('#add_nox').val())" >
        <input  id="add_selectx" 
                    style="width:100px; text-align:left" 
                    onblur="rollnum=jQuery('#add_nox').val();" />
        <input  id="add_nox" 

Open in new window

Would appreciate any suggestions.  Thank you.
Who is Participating?
William FulksConnect With a Mentor Systems Analyst & WebmasterCommented:
Could be because you haven't specified a type for the button. Check this out:
DanielAttardAuthor Commented:
Great work phungy!  Your good deed is done for the day.  Thanks for helping me out.
William FulksSystems Analyst & WebmasterCommented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.