locked
How to stop select onchange event triggered at pageload RRS feed

  • Question

  • User283528319 posted

    As far as I see onChange event of the select is triggered at <g class="gr_ gr_49 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins replaceWithoutSep" id="49" data-gr-id="49">page</g> the load however I don't want to trigger <g class="gr_ gr_67 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins replaceWithoutSep" id="67" data-gr-id="67">same</g> action twice (both page load and <g class="gr_ gr_83 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="83" data-gr-id="83">selece</g> <g class="gr_ gr_87 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" id="87" data-gr-id="87">onchage</g> shares the same function)

    how can I stop it?

    Sunday, February 3, 2019 6:43 PM

Answers

  • User475983607 posted

    fatihbarut

    As far as I see onChange event of the select is triggered at page the load however I don't want to trigger same action twice (both page load and selece onchage shares the same function)

    how can I stop it?

    The JavaScript select change event does NOT fire on page load.  Generally, the event handler is assigned when the page loads.  

    Post your code, steps to reproduce, expected results, and actual results if you need help debugging your code.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, February 3, 2019 7:08 PM

All replies

  • User475983607 posted

    fatihbarut

    As far as I see onChange event of the select is triggered at page the load however I don't want to trigger same action twice (both page load and selece onchage shares the same function)

    how can I stop it?

    The JavaScript select change event does NOT fire on page load.  Generally, the event handler is assigned when the page loads.  

    Post your code, steps to reproduce, expected results, and actual results if you need help debugging your code.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, February 3, 2019 7:08 PM
  • User283528319 posted

    <g class="gr_ gr_11 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" id="11" data-gr-id="11">sorry</g> it was miss code.

    Sunday, February 3, 2019 7:29 PM