WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 tabpane and new page loading, omega, March 18, 2004
     Re:tabpane and new page loading, krish, March 18, 2004
         Re:tabpane and new page loading, Doenderkloempen, March 25, 2004

Subject: Re:tabpane and new page loading From: Doenderkloempen Date: March 25, 2004

To make it work one line needs to be modified from

if(flag == null && flag == "false") {

into

if(flag == null || flag == "false") {


 

From: krish
Sent: March 18, 2004
Subject: Re:tabpane and new page loading

I have modified the show function to achieve this. Following is the code snippet:

WebFXTabPage.prototype.show = function () {
var el = this.tab;
var s = el.className + " selected";
s = s.replace(/ +/g, " ");
el.className = s;
this.element.style.display = "block";
var url = el.getAttribute("url");
if(url != null) {
var flag = el.getAttribute("loaded");
if(flag == null || flag == "false") {
var txt = getFile(url);
var div = document.createElement("div");
div.innerHTML = txt;
this.element.appendChild(div);
el.setAttribute("loaded", "true");
}
}
};

var oXMLHTTP = new ActiveXObject( "Microsoft.XMLHTTP" );
function getFile(sURL) {
oXMLHTTP.open( "POST", sURL, false );

// Execute the request
oXMLHTTP.send();
return oXMLHTTP.responseText;
}

--------------------------
Tab Setup:
<div style="margin-left:5px;" class="tab-pane" id="tab1">
<div class="tab-page" id="pane1">
<h2 class="tab" url="pane.html" >Pane</h2>
</div>

<div class="tab-page" id="pane2" >
<h2 class="tab" id="page2" >Workflow</h2>
</div>
</div>
----------------------------

The "pane.html" should return a html fragment.





Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX