English 中文(简体)
Jquery tab disabling
原标题:Jquery tab disabling

I am using jquery tab. I want to disable the tabs when the form is in edit mode. Iam using a query string id for this and type for identifying the tab

According to the value of id the tab is disabled. Iam using following code

 $(document).ready(function() {
        var id = getQuerystring("Id");
        if (isNaN(id)) {
            var inx = getQuerystring("type");
            if (isNaN(inx))
                inx = 1;
            inx = inx - 1;
            $( #tabs ).tabs();
        }
        else {
            var inx = getQuerystring("type");
            if (isNaN(inx))
                inx = 1;
            inx = inx - 1;
            $( #tabs ).tabs();
            $( #tabs ).tabs( select , inx);
            if (!isNaN(id)) {
                for (var cnt = 0; cnt < 6; cnt++) {
                    $( #tabs ).tabs( disable , cnt);
                    if (cnt == (inx)) {
                        $( #tabs ).tabs();
                        $( #tabs ).tabs( select , cnt);
                    }
                }
            }
        }
        if (inx == 0)
            LoadIframePage( CashReceipt.aspx?type1=1 );
        else if (inx == 1)
            LoadIframePage( CashPayment.aspx?type1=2 );
        else if (inx == 2)
            LoadIframePage( BankDeposit.aspx?type1=3 );
        else if (inx == 3)
            LoadIframePage( BankWithDrawal.aspx?type1=4 );
        else if (inx == 4)
            LoadIframePage( Journal.aspx?type1=5 );


    });






 <div id="tabs" style="font-size: 12px; width: 100%; height: 100%; visibility:hidden" onload="SelectaTab(2);">
                <ul>
                    <li><a id="cr" href="#fragment" onclick="LoadIframePage( CashReceipt.aspx?type1=1 )"><span>Cash Receipt</span></a></li>
                    <li><a id="cp" href="#fragment" onclick="LoadIframePage( CashPayment.aspx?type1=2 )"
    ><span>Cash Payment</span></a></li>
                    <li><a id="br" href="#fragment" onclick="LoadIframePage( BankDeposit.aspx?type1=3 )"><span>Bank Receipt</span></a></li>
                    <li><a id="bw" href="#fragment" onclick="LoadIframePage( BankWithDrawal.aspx?type1=4 )"><span>Bank Payment</span></a></li>
                    <li><a id="jr" href="#fragment" onclick="LoadIframePage( Journal.aspx?type1=5 )"><span>Journal</span></a></li>
                </ul>
                <div id="fragment" style="width: 100%; height: 90%">
                    <iframe  style="width: 98%; height: 100%" frameborder="0" scrolling="yes" id="ifrforms" onload="test">

                    </iframe>
                </div>

            </div>

我的模版是,制片是残疾的,但在点击制纸张时,该页被重新定位,并装上。 如何解决这一问题。

预 收

最佳回答

对LoadIframePage的功能作了界定? 请在此发言:

 if( $( #tabs ).attr("disabled") ) {
     return;  // do nothing
 } else {
     // carry on...
 }
问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签