JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old October 21st, 2004, 09:27 PM
guy99 guy99 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 2 guy99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Problem with Form Submission with Enter

I'm having some problems with my form. IE refuses to allow the use of the Enter key to submit the form, returning with 5 beeps everytime I try to submit the form with the Enter key. As far as I can tell, the onsubmit() call is not triggered at all when the Enter key is pressed.

However, if the focus was to go to the Submit button and return back to any of the textboxes without submitting the form, the Enter key would work. The interesting thing is, Mozilla 1.7.2 works like a charm. Pressing Enter submits the form instantly. The Javascript Console didn't display any errors at all. (Unfortunately, due to reasons, I'm catering strictly to IE.)

I'm guessing it has something to do with the way my form is made up of. So a brief description of my page is in order.

The page comprises of top portions. The top portion contains links which shows one div and hides the remaining divs in the bottom portion. Each div contains one form. The form is made up of 3 tables. The middle table is contained in a div, which will be hidden if a certain condition is met. Some data are given via a MySQL database. Form action is posted back to the same page, which is processed via ASP.

Below is a rough way in which the page works. (I hope that makes sense)

Code:
  <a href=# onclick="showhidediv('ref')">blah</a>
  <a href=# onclick="showhidediv('ref2')">blah2</a>
  .
  <div id='ref'>
  <form>
  <table>
  .
  </table>
  <div id='table2>
  <table>
  .
  </table>
  </div>
  <table>
  .
  </table>
  </form>
  </div>
  <div id='ref2'>
  .
  .
  .
  </div>
  

Reply With Quote
  #2  
Old October 24th, 2004, 10:10 AM
mouse85 mouse85 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 2 mouse85 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
maybe change onclick to onsubmit?

Last edited by mouse85 : October 24th, 2004 at 10:13 AM. Reason: typed wrong stuff

Reply With Quote
  #3  
Old October 24th, 2004, 11:56 PM
guy99 guy99 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 2 guy99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by mouse85
maybe change onclick to onsubmit?

Wouldn't work. The onclick calls the code which shows and hide the divs.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Problem with Form Submission with Enter


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway