This topic is locked

SAVE button and ENTER key behaviour

8/23/2006 6:37:58 AM
ASPRunnerPro General questions
R
rgke author
  1. Is it possible to change the way the SAVE button works so that it goes back to the LIST?
  2. Is it possible to change the behaviour of the ENTER key so that it tabs between the fields, or alternatively can the SAVE button be changed so that it is not selected by pressing ENTER. Apologies if this is a basic question, but I am not an html expert (which I guess is why I am using this product!).

J
Jane 8/23/2006

Hi,
see my answers below:

  1. you can do it using events.

    Proceed to the Events tab, select After record added or After record updated event and choose Redirect to another page action.
  2. you need to edit ..._add.php/..._edit.php files manually.

    Unfortunately we don't have a ready to go solution for this.

    You can see some JavaScript code in network.

    Here are some helpful links:

    http://www.webcheatsheet.com/javascript/di...e_enter_key.php

    http://www.w3schools.com/js/default.asp

R
rgke author 8/25/2006

Taking suggestion 1, is it possible to put a message out to the user saying, say, "Do you want to insert record now?", and then if they reply No, going back to the screen without losing the data they have already entered?

J
Jane 8/25/2006

Hi,
you can do it editing generated ..._add.asp file manually.

Find following line:

<input class=button type=submit value="<%= MultilangMessage("SAVE") %>" id=submit1 name=submit1>



and replace it with this one:

<input class=button type=submit value="<%= MultilangMessage("SAVE") %>" id=submit1 name=submit1 onclick="return confirm('do you want to save?');">