javascript data getting undefined
<p>Variable <code>CIMtrek_Attachement_1</code> getting undefined it is not checking the if condition it moving to this line <code>var selecteditems = CIMtrek_Attachement_1.split("\\");</code></p>

<pre><code>var CIMtrek_Attachement_1= $("#CIMtrek_RegWhseCo_Attachement_1").val();

            alert("CIMtrek_Attachement_1=666666==&gt;&gt; "+CIMtrek_Attachement_1);
            if (CIMtrek_Attachement_1 !== null &amp;&amp; CIMtrek_Attachement_1 !== "" &amp;&amp; CIMtrek_Attachement_1 === undefined)
            {
                var selecteditems = CIMtrek_Attachement_1.split("\\");

                var filename = selecteditems[(selecteditems.length-1)];

                alert("selecteditems=666==&gt;&gt; "+selecteditems);
                alert("filename=66666==&gt;&gt; "+filename);

                nodeField = createNodeField(xmlDoc, new Array("FieldName"), "Record")
                nodeField.attributes[0].value = NewFormFields[i]

                nodeField.appendChild(xmlDoc.createTextNode(filename));

                rootElement.appendChild(nodeField);
            }
</code></pre>
