hi everybody,
I have problem, please let me know how to solve this.
scenario is like
I have created the user control TimeSheet which has a timesheet grid and Add Activity button at the top.
On click of Add Activity button a AJAX Modal Popup come up which has a ifram in it which intern display ProjectActivity.aspx page.
now AJAX Modal popup has close button and projectactivity.aspx page also has a close button but AJAX modal popup close button is hidden.
when project activity.aspx close button is click im using javascript to trigger click event of AJAX Modal popup close button.
like,
window.parent.document.getElementByID('close').click();
Now comes the problem
i have placed this timesheet user control in the WebContentpage, now when i click the close button on Projectactivity.aspx page, it throw the exception stating close button not found in the AJAX modal popup.
So i did this
window.parent.document.getElementById('ctl00_ContentPlaceHolder1_test_CloseButton').click();
but i want to know the way to get this close button id through a function instead of hard coding because if i use this user control in other page then i need to change this id according,which is not correct way i feel. i want a generic approach.
Can anybody help me?