Skip to main content
Participant
May 31, 2013
Question

cfselect onClick

  • May 31, 2013
  • 5 replies
  • 967 views

I have two cfselect. Both cfselect have first option being blank (nothing selected).  These two cfselect are working as mutually Exclusive OR (i.e. if a non-blank option selected in one cfselect, then another cfselect will be set to the first option (nothing selected) before submitting the cfform.  Yet, the javascrip function for onClick event is not called (tested with alert message in the javascript function).



    This topic has been closed for replies.

    5 replies

    Legend
    May 31, 2013

    Is a javascript exception being thrown?

    First, document.forms[0] has burned me in the paste when the site template was modified to add a search form. Instead, you're passing "this" in the call, add a _this parameter in the function declarations and use _this.form in place of document.forms[0]. Once this is changed and if you're still having issue, start inserting alert('I'm here') and walk through your functions. Most likely you have an exception being thrown.

    wudang13Author
    Participant
    May 31, 2013

    I have tried with:

    _this

    this.form

    this.value

    But, the javascript functions failed to be called.

    Thank you.