Tuesday, January 17, 2012

window.document.getElementById not working in the SharePoint 2010

recently i came across a problem with getElementById. I used this function in the master page in side a JavaScript but it returned  an error. I don't know why it happened and still finding the cause. however i used a alternative  method to archive this task.

var item = window.document.getElementsByName("tagName")[0];

This worked for me.

Post a Comment