Hi, I'm using Asp.net, I have a main page containing 2 iFrames.
First iFrame is like a menu where each item is a link(a href).
Second frame is to display the aspx page corresponding to the clicked item.
I successfully updated the second frame source on click of href items while using IE and Chrome browsers, but the problem is that nothing is happening on click event using Firefox 24.0 browser, I tried more than one method to make it work, but nothing worked.
Please help.
Main Page code:
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
<table style="height:99%;width:100%">
<tr>
<td style="height:100%;width:18%">
<iframe seamless src="HelpMenu.aspx" style="height: 99%; width: 99%;overflow:hidden;"></iframe>
</td>
<td style="height:100%;width:82%">
<iframe id="contentFrame" seamless src="Introduction.aspx" style="height: 99%; width: 99%;overflow:hidden;border-right:none hidden;"></iframe>
</td>
</tr>
</table>
</asp:Content>
code of function i used to change frame source:
<asp:Content ID="AfterScript" ContentPlaceHolderID="ContentAfterScript" runat="server">
<script type="text/javascript">
$(window).ready(function () {
$("a.x-tree-node-anchor").click(function (event) {
event.preventDefault();
var pageUrl = this.text + '.aspx'
pageUrl = pageUrl.replace(' ', '')
loadIframe('contentFrame', pageUrl);
});
function loadIframe(iframeName, url) {
var $iframe = $('#' + iframeName);
$iframe.attr('src', url);
top.frames["contentFrame"].location = url;
return false;
}
});
</script>
</asp:Content>