Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 292597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:11:41+00:00 2026-05-12T06:11:41+00:00

I try to do the same thing as Davs Rants Example : http://blog.davglass.com/files/yui/tab3/ But

  • 0

I try to do the same thing as Davs Rants Example :
http://blog.davglass.com/files/yui/tab3/

But I must forget something…

I have this error :

Node was not found” code: “8 [Break on
this error]
this._tabParent.removeChild(
tab.get(ELEMENT) );

Here my code :

function onGenePubmedSubmit() {

var contentCur = document.getElementById("curatedquery");
var contentValue = contentCur.value;

// New tabView widget
var tabView = new YAHOO.widget.TabView('tvcontainer');

// Define label and content
var labelText = nameReq + '<span class="close">X</span>';
var tabcontainer = idReq;
var content = "<div id="+tabcontainer+"></div>";

// Add new tab - work well !
if (labelText && content)
{
tabView.addTab( new YAHOO.widget.Tab({
                label:labelText,
                content:content,
                id: 'pubmedView',
                active:true }));
                }

// Define DataTable myPubmedListTable Columns
var myColumnDefsPubmed = [
    {key:"pmid", label:"PMID", sortable:true},
    {key:"articletitle", label:"Article Title", sortable:true},
    {key:"abstract", label:"Abstract", sortable:true},
    {key:"authorlist", label:"Authorlist", sortable:true},
    {key:"medline", label:"Medline", sortable:true}
    ];

// Define DataSource
var myDataSourcePubmed = new YAHOO.util.DataSource("qct-list-article.html");
myDataSourcePubmed.responseType = YAHOO.util.DataSource.TYPE_JSON;
myDataSourcePubmed.connXhrMode = "queueRequests";
myDataSourcePubmed.responseSchema = {
  resultsList: "articleItemList",
  fields: ["pmid","articletitle","abstract","authorlist","medline"]
  };

// myPubmedListTable config
var oConfigsPubmed = {
    initialRequest: '?term='+ contentValue,
    selectionMode: "single"
    };

// Create new DataTable - myPubmedListTable
var myPubmedListTable = new YAHOO.widget.DataTable(idReq, myColumnDefsPubmed, myDataSourcePubmed,oConfigsPubmed);

// Show myPubmedListTable
myPubmedListTable.onShow();

// Remove tab on tabView ----------- this part don't work---------- !          
YAHOO.util.Event.on(tabView.getElementsByClassName('close')[0], 'click', function(ev) {
YAHOO.util.Event.stopEvent(ev);
             //  some test - but don't work !               
             //  tabView.set('activeTab', tabView.get('tabs')[0]);
             //  tabView.set('activeIndex', 1);
             //  tabView.removeTab(tabView.get("activeTab"));
tabView.removeTab(tabView);
                      });
}

Can someone help me ?

What I missing?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:11:41+00:00Added an answer on May 12, 2026 at 6:11 am

    I found a solution that works, and I added a paginator.

    function onGenePubmedSubmit() {
    
    var contentCur = document.getElementById("curatedquery");
    var contentCurValue = contentCur.value;
    
    var tabView = new YAHOO.widget.TabView('tvcontainer');
    
    var labelText = nameReq + '<span class="close">X</span>';
    var tabcontainer = idReq;
    var content = "<div id="+tabcontainer+"></div>";
    
    if (labelText && content)
    {
     var ctabView = new YAHOO.widget.Tab({
     label:labelText,
     content:content,
     id: 'pubmedView'+idReq,
     active:true });
    }
    
    YAHOO.util.Event.on(ctabView.getElementsByClassName('close')[0], 'click',
    function(ev) {
    YAHOO.util.Event.stopEvent(ev);
    
    // Verify if Tab to remove is curently the activ Tab
    if (tabView.get('activeTab')==ctabView)
    {
     // We activate the first Tab
     tabView.set('activeTab', tabView.get('tabs')[0]);
    }
     // If Tab to remove not activ Tab
    else if (tabView.get('activeTab')!=ctabView)
    {
     // We set the index of the Tab that is currently active in the TabView.
     tabView.set('activeIndex',tabView.get('activeIndex')); 
    }
    
    tabView.removeTab(ctabView);
    });
    
    // Verify if tab exist (or not)
    var tabExist = document.getElementById('pubmedView'+idReq);
    if (tabExist == null)
    {
     tabView.addTab(ctabView);
    }
    else
    {
     alert("Tab already exist")  ;
    }
    
    // Define DataTable myPubmedListTable Columns
    var myColumnDefsPubmed = [
    {key:"pmid", label:"PMID", sortable:true},
    {key:"articletitle", label:"Article Title", sortable:true},
    {key:"abstract", label:"Abstract", sortable:true},
    {key:"authorlist", label:"Authorlist", sortable:true},
    {key:"medline", label:"Medline", sortable:true}
    ];
    
    // Define DataSource
    var myDataSourcePubmed = new YAHOO.util.DataSource("qct-list-article.html");
    myDataSourcePubmed.responseType = YAHOO.util.DataSource.TYPE_JSON;
    myDataSourcePubmed.connXhrMode = "queueRequests";
    myDataSourcePubmed.responseSchema = {
    resultsList: "articleItemList",
    fields: ["pmid","articletitle","abstract","authorlist","medline"],
    metaFields: {
    totalRecords: "totalArticleRecords" // Access to value in the server response
    }
    };
    
    // Add Paginator
    var pubmedPaginator = new YAHOO.widget.Paginator({
    rowsPerPage: 5,
    template: YAHOO.widget.Paginator.TEMPLATE_ROWS_PER_PAGE,
    rowsPerPageOptions: [5,10,15,20]
    });
    
    var myRequestPubmedBuilder = function(oState,oSelf)
    {
    oState = oState || {pagination:null, sortedBy:null};
    
    var retstart = (oState.pagination != null) ? oState.pagination.recordOffset : 0;
    var retmax = (oState.pagination != null) ? oState.pagination.rowsPerPage : 5;
    
    return '?term=' + contentCurValue + '&retstart=' + retstart + '&retmax=' + retmax;
    }
    
    // myPubmedListTable config
    var oConfigsPubmed = {
    initialRequest: '?term=' + contentCurValue + '&retstart=0' + '&retmax=5',
    dynamicData: true, // Enables dynamic server-driven data
    selectionMode: "single",
    paginator: pubmedPaginator,
    generateRequest : myRequestPubmedBuilder,
    caption : "Pubmed articles for this query : " //+ contentCountPubmed
    };
    
    // Create new DataTable - myPubmedListTable
    if (tabExist == null)
     {
     var myPubmedListTable = new YAHOO.widget.DataTable(idReq, myColumnDefsPubmed, myDataSourcePubmed,oConfigsPubmed);
    
    
     myPubmedListTable.handleDataReturnPayload = function(oRequest, oResponse, oPayload) {
     if (oPayload == undefined)
     { oPayload = {}; }
    
     oPayload.totalRecords = oResponse.meta.totalRecords;
     return oPayload;
     }
    
     // Show myPubmedListTable
     myPubmedListTable.onShow();
     }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 237k
  • Answers 237k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer >>> import ast >>> mylist = ast.literal_eval("['foo', ['cat', ['ant', 'bee'],… May 13, 2026 at 6:30 am
  • Editorial Team
    Editorial Team added an answer Most of the credit for this goes to astander. Article… May 13, 2026 at 6:30 am
  • Editorial Team
    Editorial Team added an answer http://mvcsitemap.codeplex.com/ May 13, 2026 at 6:30 am

Related Questions

The problem is only happening with one file when I try to do a
[This question is related to but not the same as this one .] If
I want to hide a div using Javascript, as soon as the page gets
Inside SharePoint I've previously created a site template by appending _layouts/savetmpl.aspx to the end

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.