Building a Disbled vs. Enabled Save Button

Hello. I have built a Save button which starts off in a
disabled state, then gets enabled as soon as the user changes
anything in the form. As it turns out, There's a problem with using
'onchange' since it is not recognized by the DOM until the changed
<input> item loses focus, and the user may desire to press
the Save button immediately after making the change, which he
cannot do since it will remain disabled until he moves the cursor
off the <input> where he made the change. To solve that
problem, I am using 'onkeypress', which lets me enable the Save
button right away.
That actually doesn't work for a <select>, nor do we
want it to, since if the user presses 'N', for example, when the
value of the <select> is already 'N', we don't want that to
be treated as a change. For that situation, it turns out that
'onchange' is the way to go, since indeed the change in this case
is recognized by the DOM right away, without waiting for a change
in focus.
But now for the conundrum: The DOM does not consider
Backspace to be a keypress. It also does not regard Tab as a
keypress, which .is definitely how we want it to behave, since
nothing changes when the user tabs from one <input> field to
another. Sometimes that might be what we want for Backspace, too
(backspacing over spaces at the end of text, for example?). But
Backspace is in fact destructive of whatever character is to the
left of the cursor when Backspace is pressed, and that's a change.
In fact, IN SOME CASES, IT IS THE REMOVAL OF A CHARACTER - AND ONLY
THAT - which contsitutes the change the user is making. But this
key press will not fire the onkepress event, so will not let me
enable the Save button when it's the only change which occurs.
Ouch!
I haven't tried them all, but the set of events available for
<input> tags does not look promising. None appears to have a
definition which would solve this problem.
Any ideas?

Okay, it's not really necessary, but it's a lot cooler, and I
hate to abandon it. Since my original post, I have discovered in my
O'Reilly Dynamic HTML book (Appendix C, p. 1026) that IE simply
does not pass through the Backspace and Delete keystrokes although
Navigator does, as I have verified with Firefox. I consider this a
hugely stupid design decision on the part of Microsoft, so I'm much
more willing now to bite the bullet and try to become
Firefox-aware. Still, though, I may keep my disabled vs. enabled
button, and provide users with Help doc explaining the difficulty
(which I will blame on Microsoft), plus a possible solution: all my
Save buttons are inside of <TD> cells, which have an onclick
event by which I could trigger enabling the button which they
contain. Clicking the still-disabled button will be a solution
which will naturally occur to many users. On the other hand, my
client does not care as much about the 'esthetics' of the
application as I do, and my just go for a more kludgy solution
which is less likely to result in a few user phone calls. (I
realize that kludgy is in the eye of the beholder.) Thanks again
for your help.
Peyton
[email protected]

Similar Messages

  • Enabling Save button Detail tile load - event

    Hi,
       I want to disable "New" button and enable "save" button on load event of Detail tile. Can anyone plz help me out..
    Thanks
    Mateen

    You can do this by setting the authorisation of the specific tile:
    mcore.setreadonly = <boolean>
    Only true and false is allowed, It is i.e. used in the OnLoad of tile Toppcassop2 or in various other EnableModification methods.
    Regards, Kai

  • ALV grid display enable save button

    Hi gurus all,
    I want to make save button in alv display turns onn, cause now it's gray and i cannot click on it. and i'm using function reuse_alv_grid_display.
    i'm included half of my code,
      DATA: li_events  TYPE slis_t_event,
            lwa_events LIKE LINE OF li_events.
      REFRESH li_events.
      CLEAR lwa_events.
    Get event
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 4
        IMPORTING
          et_events   = li_events.
    Set event END_OF_LIST
      READ TABLE li_events WITH KEY name = 'END_OF_LIST'
      INTO lwa_events.
      IF sy-subrc = 0.
        lwa_events-form = 'END_OF_LIST'.
        MODIFY li_events FROM lwa_events TRANSPORTING form
        WHERE name = 'END_OF_LIST'.
      ENDIF.
      data : ls_variant like disvariant,
             gs_layout  type slis_layout_alv.
      ls_variant-report = sy-repid.
    Display ALV
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program     = sy-repid
          i_callback_top_of_page = 'TOP_OF_PAGE'
          it_fieldcat            = i_fieldcat
          is_layout              = gs_layout
          it_sort                = i_sortcat
          it_events              = li_events
          i_save                 = c_x
          is_variant             = ls_variant
        TABLES
          t_outtab               = i_final
        EXCEPTIONS
          program_error          = 1
          OTHERS                 = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid
                TYPE sy-msgty
                NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

    Hi memeo,
    1. Simple
    2.<b>  i_save                  = 'A'</b>
    3. While calling the fm
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    make sure u pass the parameter also. (with value 'A')
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          <b>      i_save                  = 'A'</b>
    regards,
    amit m.

  • How to enable 'SAVE' button and trigger and event on output screen.

    Hello, in the output screen, the save button is disabled .I need to activate the button and when the user clicks on it another process must be triggered. Anyone worked on something similar before.thanks.

    Your problem description is too vague, and the problem itself seems very basic. Please read about [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again.
    Thread locked.
    Thomas

  • Enabling save button

    When update 1 was installed, a Save button appeared that Saved the form to the drafts folder. It is gone now and I don't know what change caused it. We are now on patch 1. I would like to get it back. Any ideas?

    In one of the old renders, I thought I recall seeing a variable with the button data in it. Is it possible to tweak some data in the form XML similar to the route list? After the workflow is started, I can route the form back to the initiator.

  • To Disble the Field in Table Control after clicking Save button

    Hi,
    I have a requirement as follows. i need to disable one field in the table control after clicking save button. i tried with SCREEN elements but it disabling whole the table control but i need to disable that particular one record only in the table control. i found Structure CXTAB_COLUMN in documentaion. it has the properties like invisible. can any body tell how can we disble that particular field in table control only for the one record. and how can we use CXTAB_COLUMN.
    Thanks in advance.

    hi,
    do like this...
    in USER_COMMAND_1000 module of PAI,
    MODULE user_command_1000 INPUT.
      CASE ok_code.
        WHEN 'BACK' OR 'UP' OR 'CANC'.
          LEAVE PROGRAM.
        WHEN 'SAVE'.
          fl = 1.
          GET CURSOR LINE lin.
      ENDCASE.
    ENDMODULE.                 " user_command_1000  INPUT
    and make on module disable in Loop Endloop in PBO.
    and write like this...
    MODULE disable OUTPUT.
      LOOP AT SCREEN.
        IF tab1-current_line = lin AND fl = 1.
          screen-input = 0.
        ELSEIF tab1-current_line < lin.
          screen-input = 0.
        ELSE.
          screen-input = 1.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    ENDMODULE.                 " disable  OUTPUT
    here fl and lin both are type i.....
    and there will b one module in PBO
    MODULE tab1_change_tc_attr.
    in that put if condition....
    MODULE tab1_change_tc_attr OUTPUT.
      IF sy-ucomm <> '' AND sy-ucomm <> 'SAVE'.
        DESCRIBE TABLE itab LINES tab1-lines.
      ENDIF.
    ENDMODULE.                    "TAB1_CHANGE_TC_ATTR OUTPUT
    ur problem will solve...
    reward if usefull....
    Edited by: Dhwani shah on Jan 2, 2008 1:17 PM

  • How to enable the Save button in ALV_GRID_DISPLAY function module

    Dear experts,
                    I Created a  ALV report by using ALV_GRID_DISPLAY functional module ,i need to enable the SAVE button ,my reqirement is to trigger some event in save button, then if i created own PF status existing icon are hidden, mention in below screen shot.
    suggest me
    Thanks
    sivashankar k

    Hi sivashankar,
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
    *   I_INTERFACE_CHECK              = ' '
    *   I_BYPASSING_BUFFER             =
    *   I_BUFFER_ACTIVE                = ' '
           i_callback_program             = sy-repid
           i_callback_pf_status_set       = 'SET_PF_STATUS'
            i_callback_user_command        = 'USER_COMMAND'
    FORM  set_pf_status USING rt_extab TYPE slis_t_extab.
       SET PF-STATUS 'MENU'.
    ENDFORM.                  
    ""Handle use action
    FORM user_command USING r_ucomm     LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
       CASE r_ucomm.
        WHEN 'SAVE'.
       ENDCASE.
    ENDFORM.
    PF STATUS : MENU (copied STANDARD(gui status) from SAPLKKBL, do changes as per requirement)
    Regards
    Sreekanth

  • How to Enable the SAVE button in the Menu Bar of the Invoice Document.

    Hi.
    How to Enable the SAVE button in the Menu Bar of the Invoice Document as it is disabled for me.
    I would like to save the Invoice document in PDF  format.
    Regards
    Irfan

    Hi,
    Normally, for the archiving or generation of the invoice document in PDF format is handled by maintaining the output records through VV31/VV32 with the relevant printer, storage mode ( 3- print and archive or 2- archive only ), no. of messages ( means no of copies ) in the communication method.
    Then when you click the print button through VF03 in the print options pop-up you get a print at the physical printer and at the same time an archived copy ( PDF copy ) attached with the document.
    So, please make sure the output records are fine to allow a PDF copy generated and then try to print and check in VF03 by entering into the billing document.
    Hope this helps you.
    However, from the print preview you normally would not be allowed to save or print.
    Regards,
    Ram
    Edited by: Ramakrishna Peri on Apr 3, 2009 9:16 AM

  • Enabling the save button

    I was having a problem with an unbound item where if a user entered data into it and wanted to save, the save button on the menu was disabled. To get around this problem I created a post-change trigger for the unbound item where I used the set_menu_item_property to set the save button to enabled and this worked fine. I have another unbound item below the first one and I needed to do the same thing (eg. create a post-change trigger to enable the save button) but for this unbound item it doesn't work. When I go to the next item the save button remains disabled. Can anyone tell me why it works for one and not the other?
    thanks
    Cathy

    Run the debugger and single-step through your code and see what is and is not happening.

  • Save Button in ITS enabled transaction ME54N does not appear

    Hello,
    We are on EP 7 SP 18.
    Via the Universal worklist iview in the Portal when the user clicks on a workitem and desires to reject it via the transaction ME54N, for the rejection to be saved in SAP the save button on transaction ME54N must be clicked.
    However, the save button is no where to be seen on the transaction for the user to click. The following parameters are set in ITS as per note 1148291 and 1010519
    ~webgui_icon_toolbar=1
    ~webgui_simple_toolbar=1
    also tried various combinations of values for the above parameters but no luck.
    Any help on how to get to have the save button appear for the ITS enabled transaction ME54N would be greatly appreciated.
    Regards,
    Sunil

    HI Sunil
    Did you got any solution? If yes, Could you please share.

  • Save button enabled in MAX, but no changes to apply

    Hello,
    I have a situation with a number of my RT targets.  When I open an RT target in MAX, the Save button (and Revert button) are enabled as if there are settings to be applied to the unit.  I've gone through the process of pressing the save button and rebooting multiple times, and it still come back online in MAX as though there are settings to be saved on it.  I've also tried the Revert button with the same results.
    Please see the attached screen shot.  This was taken imediately after a RIO reboot, and launching MAX right after the unit came online.
    I have remotely installed software to the RIOs, and needed to set a password on some of the units recently.  But since then I've been able to verify that the software is infact installed and the passwords are infact set.  And some of these units have had restarts to be able to apply these setting many times.
    So my question is, what could be causing MAX to think that there are setting to be saved to the RIO yet?  Thanks in advance for any help.
    Attachments:
    RIO Save Revert.JPG ‏164 KB

    I had not, prior to your message, Richard.  So I did go through that process, but it did not correct the issue.  It seems to me, this issue resides on the RIO, not on the host computer.  I say this because I've had my colleagues access the RIO from their computers and see the exact same issue.
    It does appear we have a fix though.  We have installed software, where the RIO reboots into install mode and completes the installation, the reboots again into normal mode.  After this point, the problem has not reappeared.  The RIOs have gone through numerous reboots, but this is the first time since the problem arose where we booted them into install (or safe) mode. 
    For any future viewers, I will do a test soon to see if simply booting in safe mode will fix it.  But installing additional software does, and luckily we need to for our project.

  • Enabling the save button when an unboud item is changed!

    hi!
    I HAVE a block wij an unbound item, this unbound item will contain
    the concatenation if 5 bound item, I use the post query trigger (block level) to
    concat theses 5 items in the unboud item, and in the when-validate item
    of the unbound item I subdivise the value by 5 and affect each one to the
    correspondant bound item....
    My question is : when I am in the unbound item and start to change it
    I need to have the save button enabled .......because the user need
    to say that he is changind somethig ....
    Thanks for any HELP!

    Hi,
    You can use set_item_property(.... in when validate_item trigger.
    ADinath Kamode

  • How to enable save and archieve button in smartform output?

    How to enable save and archieve button in smartform output?

    Hi,
    While populating your output parameters, use parameter TDARMOD (Print Archieve Mode: 1,2 3).
    Hope this will hint you how to resolve the issue.
    BR,
    Vinit

  • Enable the Print,Save button for dashboard page in obiee11g

    Hi All,
    How To Enable print and save button for hole dashboard page.I found in 10g but i can't found in the 11g.

    All the best... if you get solution share it.
    thanks
    @User
    I'm not guru! I'm just (top) learner
    Edited by: Srini VEERAVALLI on Apr 5, 2013 6:17 AM

  • Issue with enabling the save button for Oracle Composer

    Hi
    I was trying to create a custom webcenter portal application through JDeveloper which allows the user to edit the content at runtime with the help of oracle composer.
    Followed the steps below as specified in the developers guide.
    1. Implemented ADF security.
    2. Updated the adf-config file with the required namespaces.
    3. Updated the web.xml file to set the appropriate filter mappings.
    The web application is deployed successfully without any errors. However, the save button doesn't seem to get enabled. So, not very sure if the sandbox is enabled.
    Have a hunch that there could be a problem in configuring it with the datasource as while deploying the prompt still refers to the file system mds and not from DB.
    Could somebody please provide clear steps as to how to go about the dataSource creation and configure this datastore for enabling the sandbox. It would really help in understanding it better.
    Thanks

    First of all, are you using webcenter 11.1.1.3 or 11.1.1.4?
    Judging from your explenation i should say you are using .3 because in the later releases you don't need to configure adf security anymore.
    If you are using .3 than you should complete following steps:
    http://download.oracle.com/docs/cd/E14571_01/webcenter.1111/e10148/jpsdg_page_editor_mds.htm#CHDBHBDA

Maybe you are looking for

  • Why doesn't my iTunes on Windows 8 doesn't recognize my iPhone 5?

    My iTunes used to regonize my iphone 5 when i was on windows 7, but i just recently upgraded it to windows 8 and the iTunes dosen't regonize it anymore. I have the most up-to-date updates for the iphone and itunes. Please help me find the solution to

  • Has anyone managed to install aperture 2 with a 12" G4 laptop?

    Mine runs Leopard 10.5.2 with a 1.5 Ghz processor and 1.25GB of memory. The system checker says it's fine but it tells me my graphics card will not work it properly. My graphics card is the GeForce FX Go5200. Has anyone managed to get it installed, i

  • Age debt report

    Hi, Can anyone tell what is the standard report name of aged debtor report in ECC6 and 4.0B ?

  • How to delete sale view?

    dear all:     i kown i can extend  the view of material using mm50. but i am unable to delete the sale view of the material ?   who can help me ? thank you !    bset regards!

  • Download List output displayed

    Hi Friends, I want to donwload the list output displayed from the Report program with the exisitng formatting structure (displayed). 1)From SAP menu we can click on System –> List –> Save –> Local file to download the file locally. 2) I want to obtai