Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
cannot access webmask in ultrawebtab
posted
I am using netadvantage forasp.net CLR2.0I have a webmaskedit control in an ultrawebtab.  I need to clear the data in the webmaskedit control.  I was able to access the webmaskedit control  using igedit_getById(‘webMaskEdit1’).setText(“”)  After I moved the control into the web tab, I can no longer use  igedit _getById(‘webMaskEdit1’).setText(“”).    I have also tried the following to no avail: igedit_getById(‘<%=webMaskEdit1.clientId%>’).setText(“”)  igtab_getElementByID(“webMaskEdit1”) igtab_getElementByID(‘webMaskEdit1’, ‘UltraWebTab1’) igtab_getElementByID(‘<%=webMaskEdit1.clientId%>’, ‘UltraWebTab1’)  I can access the object using document.getElementById(‘<%=webMaskEdit1.clientId%>’)  but cannot cleat the text in the control using the innerText property nor the innerHTML prop, not the .value property.   Can someone please help me.  I am out of ideas.

 

  • 24497
    posted

    Hi,

    Your codes are correct, but string values are not. Try to fix upper/lower cases of letters.

    <script type="text/javascript">
    function
    click1()
    {
     
    var mask = igedit_getById('<%=WebMaskEdit1.ClientID%>');
     
    if(!mask)
     {
       alert(
    '<%=WebMaskEdit1.ClientID%> was not found');
       
    return;
     }
     mask.setText(
    'abc');
    }
    </script>

    <igtab:UltraWebTab ID="UltraWebTab1" runat="server" Height="135px" Width="250px">
     
    <Tabs>
     
    <igtab:Tab Text="New Tab">
       
    <ContentTemplate>
         
    <igtxt:WebMaskEdit ID="WebMaskEdit1" runat="server"></igtxt:WebMaskEdit>
        
    </ContentTemplate>
     
    </igtab:Tab>
     
    </Tabs>
    </igtab:UltraWebTab>
    <input id="Button1" type="button" value="button" onclick="click1()" />