How can I assign a Jscript function return value t - InfoPath Dev
in

InfoPath Dev

How can I assign a Jscript function return value t

Last post 08-25-2005 03:41 AM by Agni Jonnalagadda. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-24-2005 01:45 PM

    How can I assign a Jscript function return value t

    SUBJECT: How can I assign a Jscript function return value to a textbox by using a Rule?

    Hi,

    I have a Jscript function that returns a value based on some calculations.

    How can I show the return value of this function within a textbox by using a Rule?

    I know that it is easy to do this job by using a button (because you can use code to handle the click event), but I need the functionality upon any change on other textboxes. The problem is you cannot use code to handle textbox change event.

    I#%92ve also gone through this article:
    http://www.infopathdev.com/howto/tutorials/default.aspx?i=88f921f13dec4e7cae61191bac084fff

    But the technique provides totally different thing.

    It helps you to use Jscript function check conditions (true/false). Moreover, It doesn't help you to assign value to textboxes. If you attempt to modify any textbox value within that Jscript function, InfoPath pops up an error and complains that you are modifying a read-only value. I think all
    textboxes become read-only when you are checking any conditions within rules or conditional formatting.


    Any help would be appreciated,

    Alan
  • 08-25-2005 03:41 AM In reply to

    Re: How can I assign a Jscript function return value t

    Hi Alan,
    Welcome to the forum.
    You can use onafterchange event to set values.

    Rules on any control(except button) execute when a value changes in the xml, its not related to textbox or any control. If you change the value in the xml it should automatically reflect in the UI.

    OnAfterChange method is also called when a value in the XML changes.

    Agni
    InfoPath Dev India
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.