hai i new to using masterpage when i use this code any of page in my website javascript code appears how to overcome this problem very urgent
<script language=javascript>function test()
{
alert(document.getElementById("editName").value));
}
script>but without using masterpage this code working perfectly

Rakrus106 reputationPosted Feb 17, 2008, 6:19 PM EST
By using MasterPages The control names are renderd differently,The control id is prefixed by ctl01_ctl02....
So check the rendered control id and use it.
Thanks
Siva Prakas12 reputationPosted Feb 17, 2008, 6:24 PM EST
Yogesh VermaRank #3,483 · 416 reputationPosted Feb 17, 2008, 7:14 PM EST
Try this:
document.getElementById(
"<%=Controlname.ClientID %>").value;or
document.getElementById(
'ctl00_ContentPlaceHolder1_Control name').valueEnjoy programming...
Siva Prakas12 reputationPosted Feb 17, 2008, 8:34 PM EST
"ctl00$ContentPlaceHolder1$editName" as ID and comeout from the pbm