views:

9

answers:

1

Please Help! How i can find DOM element :

<asp:Content .....>
....
<asp:TextBox ID="txt1" runat ="server" Text="Test"></asp:TextBox>
....
</asp:Content>

From PopUp window i will change atribute Text, But in JScode like ...

DOM = document.getelementByID("txt1")

is null.

A: 

You have to use the client-side ID of the Textbox:

var textbox = document.getElementById("<%= txt1.ClientID %>");
M4N