I think i relate my problem wrong . Let me explain step by step .
I have an iframe , inside the iframe i have a button name Button1 .
In the page which contains iframe i have a link . That link must do the
following .
whenever i click link , it must behave as like button1 is clicked.
in the below code , it doesnt work
"Mohamed El Ashmawy" said:
The click method you are using in :
iframeWin.document.forms['Form1'].Button2.click(); should work.
I've created a method as follows:
<script type="text/javascript">
function Call1(){
alert("button2 clicked");
window.document.forms['Form1'].Button2.click();
}
</script>
where Button2 is declared in the page as follows:
<asp:Button id="Button2" style="Z-INDEX: 103; LEFT: 216px; POSITION:
absolute; TOP: 296px" runat="server" Text="Button"></asp:Button>
When I call the method Call1, the button is clicked and its server side
event runs (in another sample, I made it show an alert message on client
side without postback and it worked).
Do you set the id of the button correctly? in the button declaration and
usage? Please check that there are no javascript errors that appear on the
page
Regards
Mohamed El Ashmawy
MEA Developer Support Center
ITWorx on behalf of Microsoft EMEA GTSC