Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

Unable to Access value of WebDateChooser while Using MasterPage

Last post 08-01-2008 8:29 by [Infragistics] Rumen Stankov. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-01-2008 3:28

    • Hammadmb
    • Not Ranked
    • Joined on 08-01-2008
    • Points 100

    Unable to Access value of WebDateChooser while Using MasterPage

    Hello, i'm using Infragistic WebDateChooser v 7.1 in my application, i am also using masterpages in my application. I've a scenario in which when date is changed in WDChooser control the year portion of the selected date has to be loaded in a dropdown.

    i'm using the following javascript code to fetch the selected value in WDChooser using "OnBlur"  event but it doesn't work.

    when i place the same function in another Webform that is not using  MasterPage it works absolutely perfect and displays the selected date. But i need it to work on Forms using MasterPages

    <script type="text/javascript" language="javascript"> 

    function test()
        {
            alert(document.getElementById('WebDateChooser1').value);                    
            return false;
       
        }

    </script> 

    Quick Response will be highly appreciated. 

    • Post Points: 20
  • 08-01-2008 3:50 In reply to

    Re: Unable to Access value of WebDateChooser while Using MasterPage

    Hello Hamman,

    When using nested MasterPages / UserControls (INamingContainers) the ClientID and the server ID are different. I can suggest using the following syntax:

     

    document.getElementById("<%= WebDateChooser1.ClientID %>").value 

    or better yet, use the CSOM (client-side object model of the chooser) like that:

    var chooser = igdrp_getComboById('<%= WebDateChooser1.ClientID %>');
    alert(chooser.getValue());

    More info on CSOM in WebDateChooser can be found here:

    http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR3.5/html/WebDateChooser_Object_CSOM.html
    Best Regards,
    Rumen Stankov (MCSD.NET)
    The Infragistics ASP.NET Team
    • Post Points: 20
  • 08-01-2008 6:56 In reply to

    • Hammadmb
    • Not Ranked
    • Joined on 08-01-2008
    • Points 100

    Re: Unable to Access value of WebDateChooser while Using MasterPage

     Thanks alot brother for the instant reply and ya it did solved my issue. i'm   really oblidged .

    and last but not the least my Name is  "H A M M A D"  not Hamman.

    • Post Points: 20
  • 08-01-2008 8:29 In reply to

    Re: Unable to Access value of WebDateChooser while Using MasterPage

     Oh, sorry for that - next time I will be extra careful :) Glad I was able to help.

    Best Regards,
    Rumen Stankov (MCSD.NET)
    The Infragistics ASP.NET Team
    • Post Points: 5
Page 1 of 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems