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

  • SEARCH
  • Home
  • 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 6913265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:11:47+00:00 2026-05-27T09:11:47+00:00

I am getting this JavaScript error, doing some research people are saying something about

  • 0

I am getting this JavaScript error, doing some research people are saying something about instantiating an object.

function generateRow() {    
    var i = pageCounter.getIP_count();
    //common sense counting
    i++;
    var objNEWVIP = document.getElementById("IP_row_new");
    var objMODIFYVIP = document.getElementById("IP_row_modify");

    //common DOM elements
    var memberNum = document.createTextNode('Member IP'+ i + '\u00a0');
    var brNode = document.createElement('br');
    var nbspSpace = document.createTextNode('\u00a0');
    var resolvesTextNode = document.createTextNode('Resolves: \u00a0');

    //new_IP_Octet1_Element
    var new_IP_Octet1_Element = document.createElement('input');
    new_IP_Octet1_Element.setAttribute('type','text');
    new_IP_Octet1_Element.setAttribute('maxlength','3');
    new_IP_Octet1_Element.setAttribute('size','3');
    new_IP_Octet1_Element.setAttribute('name','IP'+i+'_octet1');
    new_IP_Octet1_Element.setAttribute('id','IP'+i+'_octet1');
    new_IP_Octet1_Element.setAttribute('value','167');
    new_IP_Octet1_Element.setAttribute('size','3');
    new_IP_Octet1_Element.setAttribute('hostname','IP'+i+'_hostname');
    new_IP_Octet1_Element.onchange =  function () { resolveMe(this.id); };
    //new_IP_Octet1_Element.setAttribute('onchange', 'resolveMe(this.id);');

    //new_IP_Octet2_Element
    var new_IP_Octet2_Element = document.createElement('input');
    new_IP_Octet2_Element.setAttribute('type','text');
    new_IP_Octet2_Element.setAttribute('maxlength','3');
    new_IP_Octet2_Element.setAttribute('size','3');
    new_IP_Octet2_Element.setAttribute('name','IP'+i+'_octet2');
    new_IP_Octet2_Element.setAttribute('id','IP'+i+'_octet2');
    new_IP_Octet2_Element.setAttribute('value','69');
    new_IP_Octet2_Element.setAttribute('size','3');
    new_IP_Octet2_Element = function () { resolveMe(this.id); };
    //new_IP_Octet2_Element.setAttribute('onchange', 'resolveMe(this.id);');

    //new_IP_Octet3_Element
    var new_IP_Octet3_Element = document.createElement('input');
    new_IP_Octet3_Element.setAttribute('type','text');
    new_IP_Octet3_Element.setAttribute('maxlength','3');
    new_IP_Octet3_Element.setAttribute('size','3');
    new_IP_Octet3_Element.setAttribute('name','IP'+i+'_octet3');
    new_IP_Octet3_Element.setAttribute('id','IP'+i+'_octet3');
    new_IP_Octet3_Element.setAttribute('value','0');
    new_IP_Octet3_Element.setAttribute('size','3');
    new_IP_Octet3_Element = function () { resolveMe(this.id); };
    //new_IP_Octet3_Element.setAttribute('onchange', 'resolveMe(this.id);');

    //new_IP_Octet4_Element
    var new_IP_Octet4_Element = document.createElement('input');
    new_IP_Octet4_Element.setAttribute('type','text');
    new_IP_Octet4_Element.setAttribute('maxlength','3');
    new_IP_Octet4_Element.setAttribute('size','3');
    new_IP_Octet4_Element.setAttribute('name','IP'+i+'_octet4');
    new_IP_Octet4_Element.setAttribute('id','IP'+i+'_octet4');
    new_IP_Octet4_Element.setAttribute('value','0');
    new_IP_Octet4_Element.setAttribute('size','3');
    new_IP_Octet4_Element = function () { resolveMe(this.id); };
    //new_IP_Octet4_Element.setAttribute('onchange', 'resolveMe(this.id);');

    //make SPAN for DNS reverse resolution
    var reverseDNS_Element = document.createElement('span');
    reverseDNS_Element.setAttribute('id','IP'+i+'_hostname');
    reverseDNS_Element.setAttribute('name','IP'+i+'_hostname');

    //output
    if (document.getElementById('requesttype').value == "new") {
        objNEWVIP.appendChild(memberNum);
        objNEWVIP.appendChild(new_IP_Octet1_Element);
        objNEWVIP.appendChild(nbspSpace);
        objNEWVIP.appendChild(new_IP_Octet2_Element);
        objNEWVIP.appendChild(nbspSpace);
        objNEWVIP.appendChild(new_IP_Octet3_Element);
        objNEWVIP.appendChild(nbspSpace);
        objNEWVIP.appendChild(new_IP_Octet4_Element);
        objNEWVIP.appendChild(nbspSpace);
        objNEWVIP.appendChild(resolvesTextNode);
        objNEWVIP.appendChild(reverseDNS_Element);
        objNEWVIP.appendChild(brNode);
    }
     if (document.getElementById('requesttype').value == "modify") {
        objMODIFYVIP.appendChild(memberNum);
        objMODIFYVIP.appendChild(new_IP_Octet1_Element);
        objMODIFYVIP.appendChild(nbspSpace);
        objMODIFYVIP.appendChild(new_IP_Octet2_Element);
        objMODIFYVIP.appendChild(nbspSpace);
        objMODIFYVIP.appendChild(new_IP_Octet3_Element);
        objMODIFYVIP.appendChild(nbspSpace);
        objMODIFYVIP.appendChild(new_IP_Octet4_Element);
        objMODIFYVIP.appendChild(nbspSpace);
        objMODIFYVIP.appendChild(resolvesTextNode);
        objMODIFYVIP.appendChild(reverseDNS_Element);
        objMODIFYVIP.appendChild(brNode);
    }
    pageCounter.addMethod("ip_count"); //increment after adding row
}

generateRow() function gets called when a user clicks a button.

What object am I instantiating…and how do I do that?

I think the problem lies with

var objNEWVIP = document.getElementById("IP_row_new");
var objMODIFYVIP = document.getElementById("IP_row_modify");

But i am unsure how to create a new object at this location…

Here is the counter function

function counterObj(){
    //object to keep track of all counts across all forms
    this.ipCountTotal = 0;
    this.dnsElementTotal = 0;
    this.approverTotal = 0;
    //input methods mapping
    this.clear = clearing;
    this.addMethod = add; 

    //retreval methods mapping
    this.getIP_count = function() { return(this.ipCountTotal);};
    this.getDNS_count = function() { return(this.dnsElementTotal);};
    this.getApprover_count = function() { return(this.approverTotal);};

    //addMethod
    function add(strType){
        switch(strType) {
            case "dns_count":
                this.dnsElementTotal++;
                break;
            case "ip_count":
                this.ipCountTotal++;
                break;
            case "approver_count":
                this.approverTotal++;
                break;
        } //end swtich strType

    }



    //clear all
    function clearing(){
        this.ipCountTotal = 0;
        this.dnsElementTotal = 0;
        this.approverTotal = 0;
    }

}

Here is the declaration:

var pageCounter = new counterObj();
 pageCounter.clear()

Here are the html DIVs

<div id="ip_row_new" title="please provide the ip address of each endpoint member.">

</div>

and…

<div id="IP_row_modify">
            <!-- dynamically adds new rows -->
</div>

Here is the select statement in the HTML that the user will pick….

<select id="requesttype" name="requestType"  onChange="checkF5Request(this.value);" tabindex="2">
                    <option value="...">...</option>
                    <option value="new">New Request</option>
                    <option value="modify">Modify Request</option>
                    <option value="delete">Removal Request</option>
                    <option value="iRule_redirect">iRule Redirect</option>

                    </select>

Here is the error:

Error: uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMHTMLDivElement.appendChild]"  nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"  location: "JS frame :: https://request.psp :: generateRow :: line 358"  data: no]
  • 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-27T09:11:48+00:00Added an answer on May 27, 2026 at 9:11 am

    So your new_IP_Octet2_Element is a function:

    new_IP_Octet2_Element = function () { resolveMe(this.id); };
    

    ..which cannot be passed to appendChild(), which requires a DOM node.

    I’m not sure what’s the point of this function, but if you remove it, the error on the objNEWVIP.appendChild(new_IP_Octet2_Element); should go away.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting a javascript error. It has to do with this section of code:
I'm not good with JavaScript, and this is Google's code. I'm getting a object
I'm doing some maintenance coding on a webapp and I am getting a javascript
I'm getting an unterminated string literal Javascript error with this code: var test =
I'm getting this error with this javascript can anyone help me figure out what
Getting this error: 2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler
Getting this error with jquery & jquery.form. Site has been live for awhile..upgraded to
Anyone getting this error when using the new free chart controls MS bought from
I´m getting this error while trying to commit to a svn repository: svn: MKACTIVITY
Keep getting this error after inserting a subdatasheet into a query and trying to

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.