views:

21

answers:

1

Hi i have a jquery tab. On each tab click i want to load a fresh page . I am using iframe, but while tab switching only the source is changed loading event does not takes place. How can i solve this?

CODE......

function LoadIframePage(url) {

    document.getElementById("ifrforms").src= url;

}
<div style="float: none; height: 800px" onload="test">


        <div id="tabs" style="font-size: 12px; width: 100%; height: 100%; visibility:hidden" onload="SelectaTab(2);">
  <ul>
                <li><a href="#fragment" onclick="LoadIframePage('CashReceipt.aspx')"><span>Cash Receipt</span></a></li>
                <li><a href="#fragment" onclick="LoadIframePage('CashPayment.aspx')" ><span>Cash Payment</span></a></li>
                <li><a href="#fragment" onclick="LoadIframePage('BankDeposit.aspx')"><span>Bank Receipt</span></a></li>
                <li><a href="#fragment" onclick="LoadIframePage('BankWithDrawal.aspx')"><span>Bank Payment</span></a></li>
                <li><a href="#fragment" onclick="LoadIframePage('Journal.aspx')"><span>Journal</span></a></li>
            </ul>
            <div id="fragment" style="width: 100%; height: 90%">
                <iframe src="CashPayment.aspx"  style="width: 98%; height: 100%" frameborder="0" scrolling="yes" id="ifrforms">

                </iframe>
                </div>
</div>
</div>
A: 

One solution for this is using seperate div and iframe to each tab and load all iframes on the page load...Hence ion tabswitching just tell about the target div... but it will be slow down the application... thats y am searching for a new fast solution...

Nithesh