B
Ben
Hi,
I have a ASP page which applied default master page style.
I added a html text control in the ContentPlaceHolder and try to access
it in javascript.
I always got a null value of document.form2.DataType.value.
('document.form2.DataType' is null or not an object)
Could anyone point out error in the following code?
Thanks,
Ben
----------------Begin of ASPX file-----------------
<%@ Page Language="VB" Transaction="Required"
MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
CodeFile="dataPage.aspx.vb" Inherits="DataPage" title="xxxx" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<form id="form2">
<div>
<INPUT id="DataType" type=text />
</div>
</form>
<script language="javascript">
function ShowPopup()
{
document.form2.DataType.value = "Raw Data"; //
return true;
}
</script>
</asp:Content>
----------------End of ASPX file-----------------
I have a ASP page which applied default master page style.
I added a html text control in the ContentPlaceHolder and try to access
it in javascript.
I always got a null value of document.form2.DataType.value.
('document.form2.DataType' is null or not an object)
Could anyone point out error in the following code?
Thanks,
Ben
----------------Begin of ASPX file-----------------
<%@ Page Language="VB" Transaction="Required"
MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
CodeFile="dataPage.aspx.vb" Inherits="DataPage" title="xxxx" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<form id="form2">
<div>
<INPUT id="DataType" type=text />
</div>
</form>
<script language="javascript">
function ShowPopup()
{
document.form2.DataType.value = "Raw Data"; //
return true;
}
</script>
</asp:Content>
----------------End of ASPX file-----------------