AddScript is not working after DirectEventArgs.Success = false

  1. #1

    AddScript is not working after DirectEventArgs.Success = false

    <p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:
    normal">Hi,</p>

    <p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:
    normal"> </p>

    <p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:
    normal">I'm adding a
    script thru the ResourceManager.AddScript method.</p>

    <p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:
    normal">Everything is
    fine (the script is executed), if I don't have any validation error (business
    logic validation). </p>

    <p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:
    normal">Take into
    account that if there is a validation error, I'm setting the success property
    to false and the ErrorMessage to display at the client side thru a message
    box. </p>

    <p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:
    normal">When a
    validation error occurs, the message box is showed ok, but the script is not
    executed.</p>

    <p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:
    normal"> </p>

    <p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:
    normal">Thanks,
    Ariel</p>



  2. #2

    RE: AddScript is not working after DirectEventArgs.Success = false

    Hi,

    If you set Success to the false then all scripts are rejected because it is mean that event is failed. I recommend do not set it to false if you need execute a script on the client side. Just add required script (for example, which shows error message)

Similar Threads

  1. Replies: 3
    Last Post: Jul 16, 2012, 7:36 AM
  2. DirectMethod success and failure not working
    By mtrutledge in forum 1.x Help
    Replies: 3
    Last Post: Mar 14, 2012, 1:08 PM
  3. [CLOSED] Listview Sortable=false not working
    By jchau in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Feb 21, 2011, 5:56 PM
  4. Replies: 0
    Last Post: Dec 08, 2009, 1:57 AM
  5. [CLOSED] [1.0] Button MenuArrow=false isn't working
    By Inoventus in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 04, 2009, 10:26 AM

Posting Permissions