Skip to main content
praveenaa11254626
Participating Frequently
Jun 10, 2016 4:19 PM UTC
Question

Unable to get the property 'split' of undefined or null reference

Hi,

we have developed an application with cold fusion technology. In one particular page we have few javascript code. I get the javascript error as

unable to get the property splice of undefined or null reference.

i am unable to get to know why this error comes. Along with the error it also shows the line no.

please help me with this

thanks

praveena A

    This topic is closed to new replies. Start a new post to keep the conversation going.

    10 replies

    WolfShade
    Legend
    Jun 10, 2016 5:08 PM UTC

    Hello, Praveena,

    Please help us to help you.  We need to see your code, especially whatever function is defined that contains that line number you mentioned in the error message.

    V/r,

    ^_^

    Translate
    praveenaa11254626
    Participating Frequently
    Jun 20, 2016 8:39 AM UTC

    Hello,

    When I click on a drop-down where data has to be selected , I get the below error: 

    Below is the code and in Error message the line no mentioned is 96 which is highlighted

    <cfset listaEmpleadosMail="">

    <cfloop list="#FORM.listaEmpleados#" index="elemento">

      <cfif Trim(listaEmpleadosMail) EQ "">

       <cfset listaEmpleadosMail= elemento & "@abc.com">   --- *(This is the line no 96)*--

      <cfelse>

       <cfset listaEmpleadosMail=listaEmpleadosMail & "," & elemento & "@abc.com">

      </cfif>

    </cfloop>

    Translate
    WolfShade
    Legend
    Jun 20, 2016 1:23 PM UTC

    Hi, Praveena,

    It never even occurred to me to point out that a CF error will give the actual line number of _code_ that generated the error; but JavaScript is a client-side script, so it will provide the line number of the HTML that is generated by the server, not the line number of the code that produced it.  My apologies - I should have been more thorough in formulating my request.

    If you could, please, do a "View Source" on the HTML after the JavaScript error alert is dismissed, and provide the JavaScript function or code that is causing the issue.

    V/r,

    ^_^

    Translate