JS written inside <Change> tag is being called in page load also.

  1. #1

    JS written inside <Change> tag is being called in page load also.

    <ext:NumberField ID="NfConversionCost2" runat="server" Width="135px" MaxLength="10"
                                                            DecimalPrecision="2" Cls="numbericFieldCss" DisabledClass="DisabledFieldCss"
                                                            AllowDecimals="true" AllowNegative="true" StyleSpec="text-align:right;padding-right:7px"
                                                            TrimTrailedZeros="false" AllowExponential="false" HideTrigger="true" MouseWheelEnabled="false">
                                                            <Listeners>
                                                                <SpecialKey Fn="PreventEscape" PreventDefault="true" />
                                                                <Change Fn="SetCurrentUPCOnValueChange" CausesValidation="true"  />
    
                                                            </Listeners>
                                                        </ext:NumberField>
    In the above piece of code, I have a function written in the Change tag, which is meant to be fired only when the value in the numberfield is changed. But this function is being called even during the page load. How do I get rid of this. Is there any particular property to be set. This was working fine in ext.net 1.1. Now that I have migrated it from 1.1 to 2.5 facing this problem.
  2. #2
    Hi @arjunrvasisht,

    Welcome to the Ext.NET forums!

    I would also expect the Change event should not fire on page load. Though, how do you set a value?

    Ideally, please provide a full test case to reproduce the issue.
  3. #3
    Hi Daniil,
    Which value setting are you asking about.?
    Setting value to the numberfield during the page load.?
  4. #4
    I just assume that you apply some value to the NumberField initially and I don't know how you do it.

    Setting value to the numberfield during the page load.?
    So, you probably do it in Page_Load. Please demonstrate how.

Similar Threads

  1. Replies: 3
    Last Post: May 09, 2014, 5:30 AM
  2. Load web page inside tabpanel server side
    By amathos in forum 2.x Help
    Replies: 6
    Last Post: Feb 07, 2013, 8:57 AM
  3. Replies: 1
    Last Post: Dec 12, 2012, 3:21 PM
  4. [CLOSED] [1.0] How to load a page inside a tabpanel dynamically.
    By Hari_CSC in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 28, 2010, 3:37 PM
  5. tab change on page load
    By [WP]joju in forum 1.x Help
    Replies: 8
    Last Post: Dec 07, 2009, 8:21 AM

Tags for this Thread

Posting Permissions