sreecheck 0 Newbie Poster

Hi,

I want to access a textbox in content page (contentplaceholder1) from a .JS file.

From inline javascript i am to do so using document.getElementById('<%=TextBox1.ClientID%>') But from .JS file this throws an error. Although here following does work.. document.getElementById('ctl00_ContentPlaceHolder1_TextBox1') Is there anyway to make this dynamic so as to avoid hardcoding as above in the JS file?
Thanks in advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.