jQuery UI Widgets Forums Plugins Validator, Drag & Drop, Sortable Validator actions and javascript events – what exactly is the relationship?

This topic contains 2 replies, has 2 voices, and was last updated by  alastairwalker 8 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • alastairwalker
    Participant

    I am trying to relate the actions in the API documentation (i.e. ‘blur’) with javascript events i.e. the list below, as a sample:

    onblur – When a user leaves an input field
    onchange – When a user changes the content of an input field
    onchange – When a user selects a dropdown value
    onfocus – When an input field gets focus
    onselect – When input text is selected
    onsubmit – When a user clicks the submit button
    onreset – When a user clicks the reset button
    onkeydown – When a user is pressing/holding down a key
    onkeypress – When a user is pressing/holding down a key
    onkeyup – When the user releases a key
    onkeyup – When the user releases a key
    onkeydown vs onkeyup – Both

    To use a js event like ‘onblur’ do I simply write the action part of the rule as

    action: onblur

    It is not clear how the js actions are mapped to the Validation references i.e. how ‘blur’ is mapped to ‘onblur’.

    Any explanation will be helpful.

    Many thanks,

    Alastair Walker


    Ivo Zhulev
    Participant

    Hi alastairwalker,

    This is just the way your write the event in the validator action prop. OnBlur is Blur, OnKeYUp is KeyUp and so on.
    And yes the event is the same as in the JS. When you set the action prop to lets say KeyUp its checking the rule when the user releases a key – same as in the JS.

    Best Regards,
    Ivo

    jQWidgets Team
    http://www.jqwidgets.com/


    alastairwalker
    Participant

    Many thanks for response!

    It is still not clear to me how the mapping/translation is performed between the jqxValidator term i.e. ‘blur’ and the javascript event (say ‘onBlur’).

    Is the user/designer responsible for the mapping, or is this mapping undertaken within the jqxValidator widget?

    Kind regards,

    Alastair

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.