That is the default HTML standard. A "submit" button must be that - if you
want to change the "look" of the button use CSS.

Buttons do not "submit" by default unless you write the code to do it (eg:
_javascript_).

--
Peter Tilbrook
ColdFusion Applications Developer
ColdGen Internet Solutions
Manager, ACT and Region ColdFusion Users Group - http://www.actcfug.com
4/73 Tharwa Road
Queanbeyan, NSW, 2620
AUSTRALIA

Telephone: +61-2-6284-2727
Mobile: +61-0439-401-823
E-mail: [EMAIL PROTECTED]

World Wide Web: http:/www.coldgen.com/
________________________________

From: Hugo Ahlenius [mailto:[EMAIL PROTECTED]
Sent: Saturday, 13 March 2004 6:13 PM
To: CF-Talk
Subject: OT: Re: how to submit a form by pressing enter - bit complicated!

I have a related problem -- how do I make sure that pressing enter in an
input box submits the form -- it doesn't seem to do that after I replaced
the submit button with a <button> button...

--
Hugo Ahlenius

-------------------------------------------------------------
Hugo Ahlenius                  E-Mail: [EMAIL PROTECTED]
Project Officer                Phone:            +46 8 230460
UNEP GRID-Arendal              Fax:              +46 8 230441
Stockholm Office               Mobile:         +46 733 467111
                               WWW:       http://www.grida.no
-------------------------------------------------------------

---- Original Message ----
From: "cf coder" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, March 11, 2004 13:51
Subject: how to submit a form by pressing enter - bit complicated!

| Hello Everybody,
|
| Can I just say that I've looked everywhere to find a
| solution to this problem and have failed.
|
| I am posting my code and would really appreciate if
| someone could help. I have two forms in my page each
| contained in a div tag. Actually the second form is
| called from a iframe from within a div tag. You will
| understand it after you've seen the code.
|
| <script language="_javascript_" type="text/_javascript_">
|
| <!--
|  function mouseaction_next()
|  {
|     if(document.newcall.cust_login.value != ""){
|           window.userdetailsIframe.location.href =""> | "/pages/userdetails.cfm?userDetails="+document.newcall.cust_login.value;
|       }
|  }
| -->
| </script>
|
| <form name="newcall" id="newcall" action=""> | method="get">
| <div id="div1" style="z-index:2; position:absolute;
| left:45px; top:27px; visibility:visible;">
|  <table>
|   <tr>
|    <td valign="middle">
|     Enter Login ID:
|    </td>
|    <td valign="middle">
|    <input id="cust_login" name="cust_login"
| type="text">
|    </td>
|    <td valign="bottom">&nbsp;&nbsp;&nbsp;
|    <input type="image" id="next_button"
| name="next_button" src=""> | border="0" alt="Next" ,
| mouseaction_next);" > | return false;" width="83px" height="27px"
| style="z-index:100">
|    </td>
|   </tr>
|  </table>
| </div>
| </form>
|
| <div id="div2" style="z-index:2; position:absolute;
| left:43px; top:105px; visibility:visible;">
|     <iframe allowtransparency="yes"
| id="userdetailsIframe" name="userdetailsIframe"
| width="670px" height="300px" frameborder="0"
| scrolling="no" src=""> | </div>
|
| Here is the code contained in the iframe
| (seaarchform.cfm)
|
| <form name="searchform" action=""> | method="post">
| <div id="search" style="z-index:2; position:absolute;
| left:0px; top:0px; visibility:visible;">
|  <table border="0">
|   <tr valign="bottom">
|    <td colspan="3" align="center">
|        <input type="text" name="number" id="number"
| size="30">
|    </td>
|   </tr>
|   <tr>
|     <td align="right" valign="top">
|      <input type="image" src=""> | border="0" name="search_button" id="search_button"
| alt="Search for calls">
|     </td>
|   </tr>
|  </table>
| </div>
| </form>
|
| Here is my problem. I input some text in the textfield
| contained in the form 'newcall' and hit the enter key.
| I expect the focus to switch to the image tag
| contained in the form 'next_button', which should then
| call the _javascript_ function and redirect the user to
| userdetails.cfm. This does not happenn.
|
| However if I input some text in the textfield (number)
| contained within the second form (searchform) and hit
| the enter key, the focus switches to the
| #search_button' image button and I'm directed to the
| search results page.
|
| I don't know how to get round this problem and would
| really apprecaite if someone could help.
|
| Best Regards,
| cfcoder
|
|
| __________________________________
| Do you Yahoo!?
| Yahoo! Search - Find what you're looking for faster
| http://search.yahoo.com
|
|
________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to