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
412
Can't Reference Input control inside UltraWebTab
posted

When doing document.form1.item("txtHPoints").value it doesn't work when the control is inside the UltraWebTab control.  How can I reference the value of this INPUT control inside the UltraWebTab?

Here is my page...if you move the controls outside the UltraWebTab then the document.form1.item("txtHPoints").value works find.

Thanks

 

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test3.aspx.vb" Inherits="testing_test3" %>

<%@ Register Assembly="Infragistics2.WebUI.UltraWebTab.v7.3, Version=7.3.20073.38, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.UltraWebTab" TagPrefix="igtab" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script language="javascript" type="text/javascript">
function calcDollarAmount()
    {
        if (document.form1.item("txtHPoints").value != "")
        {
            document.form1.item("txtHDollars").value = "$" + CurrencyFormatted(parseFloat(document.form1.item("txtHPoints").value) / 100);
        }
    }
function CurrencyFormatted(amount)
{
    var i = parseFloat(amount);
    if(isNaN(i)) { i = 0.00; }
    var minus = '';
    if(i < 0) { minus = '-'; }
    i = Math.abs(i);
    i = parseInt((i + .005) * 100);
    i = i / 100;
    s = new String(i);
    if(s.indexOf('.') < 0) { s += '.00'; }
    if(s.indexOf('.') == (s.length - 2)) { s += '0'; }
    s = minus + s;
    return s;
}
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <igtab:ultrawebtab id="UltraWebTab1"
            runat="server"><Tabs>
<igtab:Tab><ContentTemplate>
&nbsp;
Points<input id="txtHPoints" type="text" onchange="calcDollarAmount()" runat="server" />
        <br />
        Value<input id="txtHDollars" type="text" runat="server" />
</ContentTemplate>
</igtab:Tab>
</Tabs>
</igtab:ultrawebtab>
        &nbsp;&nbsp;
    </div>
    </form>
</body>
</html>

Parents
  • 995
    posted

    Hi,

    Hence, the UltraWebTab control is container control, objects inside WebTab have different client side Ids. You can use following client side Ids in your applictaion or use document.getElementById(id).
    "UltraWebTab1_ctl00_txtHPoints"
    "UltraWebTab1_ctl00_txtHDollars"

      

Reply Children