On my aspx page, I am calling the 123.js file from within the solution. Here is how it looks:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="1.aspx.cs" Inherits="1" ValidateRequest="false"%>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script src="Scripts/123.js" type="text/javascript"></script>
.
.
.
.
<tr>
<td>Start DateTime</td>
<td>
<asp:TextBox ID="txtStartDateTime" runat="server"></asp:TextBox>
</td>
<td>
<a href="javascript:_fnSet('this', 'txtStartDateTime', 'close=true,instance=single')">
<img src="Styles/imagesCA3B3R54.jpg" alt="IMG" style="border-style: none" />
</a>
</td>
</tr>
</asp:Content>
The function fnSet() can be found in 123.js and it starts with:
function _fnSet(e, sInputID, sCustom) {
var oInput = document.getElementById(sInputID);
}
Even though sInputID contains the value 'txtStartDateTime' as a string, the oInput variable returns null.
Why is this happening..???