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> 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> </div> </form></body></html>
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"
Looks like if my original ticket I failed to mention that I have nested UltraWebTabs and the controls are inside the child web tab control. If I had one UltraWebTab control, this does work, document.form1.item("UltraWebTab1_ctl00_txtHPoints").value.
How can I get to my control that inside nested UltraWebTab controls?
UltraWebTab1 = Parent
UltraWebTab2 = Child
txtHPoints is contained inside the UltraWebTab2 and is what I need to reference.