Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic client side script.

Status
Not open for further replies.

qwert231

Programmer
Sep 4, 2001
756
US
I have a web page that will dynamically show textboxes representing quantities of various items.
I am doing this in a repeater. So my repeater looks like this:
Code:
<asp:Repeater id=&quot;rptProcessing&quot; runat=&quot;server&quot;>
 <ItemTemplate>
  <asp:TextBox id=&quot;tbQuant&quot; Width=&quot;50px&quot; runat=&quot;server&quot;></asp:TextBox>&nbsp;<%# container.dataitem(&quot;UoM&quot;) %>
  of
  <%# container.dataitem(&quot;filmName&quot;) %>
   <asp:TextBox id=&quot;tbMult&quot; runat=&quot;server&quot; Visible=&quot;False&quot;><%# container.dataitem(&quot;Multiplier&quot;) %></asp:TextBox>
   <asp:Label id=&quot;Label1&quot; runat=&quot;server&quot; Visible=&quot;False&quot;></asp:Label>
   <br />
 </ItemTemplate>
</asp:Repeater>

I want to write client side script that will look at tbQuant and tbMult to multiply them on the fly (without the round trip to the server) and then post the results in the Label. I have a code behind page, but I figure the client side has to go into a <script.../> block. Can I do this with VB? Or do I have to use Javascript. If so, can Javascript work with the label? How do I address it, as a Span? Can I make the label visible with Javascript? Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top