×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

don't save on [Enter] in web form

don't save on [Enter] in web form

don't save on [Enter] in web form

(OP)
hello

I have a webform withmy own submit button that checks the form, then saves the document and after this directs to a page ok or error

it runs well

it findas error s and then gets me to the right page but the problem is when someone presses enter while writing in a text field. notes just saves the docuemtn as it is and displays the message "form processed"

how can i supress that notes catches the enter

an event OnPressEnter would be nice ;)

regards

Stephan

RE: don't save on [Enter] in web form

You've got onKeyPress, just put some code in there to examine event.keyCode. if event.keyCode == 13 then do nothing (return false) otherwise do the normal operation (return true)

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.

RE: don't save on [Enter] in web form

(OP)
hi dwarthrower

I have never seen before any java,
so where to get the event object, and how to return sth.

I have only some little experiences on LotusScript but I think It won't be the same, or?

thanks in advance


Stephan

RE: don't save on [Enter] in web form

No, JavaScript and LotusScript are different. On your form there is a JavaScript event handler called onKeyPress. If you add the following code:

return(event.keyCode!=13)

The browser will check to see if the key pressed was enter and do nothing if the enter key was pressed, all other keys will function normally.

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.

RE: don't save on [Enter] in web form

(OP)
Life can be so simple.....


Thank you so much dwarthrower

Stephan

RE: don't save on [Enter] in web form

or just add a hidden SaveOptions field with the value "0"

Woonjas
IRC: #notes on EFNet

RE: don't save on [Enter] in web form

Another way is to validate the form onClick of the submit button.

Fight?

What fight?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close