Question : How do I modify textboxes/labels in an asp:repeater footertemplate through javascript (client side)

Hi:

I've got an asp:repeater control defined on a standard aspx web page.

I have a label::> lTotalPayment defined within my FooterTemplate

On the client side (through javascript), I'd like to be able to find the control and
update it's text value. I'm doing this in response to textbox change handlers firing
on the clientside (javascript).

===============================================================
This is what my asp:repeater control looks like:
===============================================================
<div id="div1">
    <asp:Repeater ID="Repeater1" runat="server"  >
        <HeaderTemplate>
            <table border="1" width="800px">
                <tr>
                    <td>
                        <strong> Repeater Header</strong>
                    </td>
                </tr>
        </HeaderTemplate>

        <ItemTemplate>
            <tr>
                <td class="indent vmid">
                    <uc1:SomeUserControl />
                </td>
            </tr>
        </ItemTemplate>
   
   
        <FooterTemplate>
                <tr>
                    <td>
                        <div class="rowH indent">
                            <div class="row">
                                <div class="columnRight">
                                    <asp:Label ID="lTotalPayment" runat="server" Text="1,000.00" Width="100" Visible="true"/>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
            </table>
        </FooterTemplate>
    </asp:Repeater>

</div>

Answer : How do I modify textboxes/labels in an asp:repeater footertemplate through javascript (client side)

Can you try this:
1: Set the property ClientIDMode="Static" for your label lTotalPayment in footer.
2: Then try this modification for the js function:

function footer() {
        var lbl = document.getElementById('lTotalPayment');
lbl.innerText="SomeValue";
    }

I haven't tested it but see if that works but should be something along that line for sure.
Random Solutions  
 
programming4us programming4us