A
Andrzej Wegrzyn
Hi,
I had a portal that worked before, and over 5 months period JavaScript
errors started to show up on all forms where I have datagrids.
Using: IE 6.0, WIN XP, IIS 5.1, Framework 1.1
error: Expected ';'
The only JavaScript there is given to my by .NET:
<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
theform = document.forms["ZoneList:_ctl0"];
}
else {
theform = document.ZoneList:_ctl0;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
This is the datagrid:
<aspataGrid id="MyList" runat="server" width="55%"
BorderColor="#ffffff"
GridLines="none"
cellpadding="1"
cellspacing="0"
ItemStyle-CssClass="item"
HeaderStyle-ForeColor="white"
HeaderStyle-CssClass="GridHeader"
HeaderStyle-Height="19"
AlternatingItemStyle-CssClass="alternating"
AllowPaging="True"
OnPageIndexChanged="PageList"
PagerStyle-Mode="NumericPages"
PagerStyle-ForeColor="Black"
PagerStyle-HorizontalAlign="right"
PagerStyle-CssClass="pager"
PageSize="10"
AllowSorting="true"
OnSortCommand="SortCommand_OnClick"
AutoGenerateColumns="false"
DataKeyField="ZoneID">
<Columns>
<asp:TemplateColumn HeaderText="">
<ItemTemplate>
<asp:CheckBox id="Checkbox" Value="andy" runat="server" />
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="">
<ItemTemplate>
<asp:Label visible="false" id="ZoneID" runat="server" Text='<%#
DataBinder.Eval(Container.DataItem, "ZoneID") %>' />
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Zone Name" SortExpression="ZoneName">
<ItemTemplate>
<a href="Zone_view.aspx?ZoneID=<%# DataBinder.Eval(Container.DataItem,
"ZoneID") %>" class="regLink"><%# DataBinder.Eval(Container.DataItem,
"ZoneName") %></a>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn HeaderText="Internal Name" DataField="ZoneInternalName"
SortExpression="ZoneInternalName"/>
<asp:BoundColumn HeaderText="Date Created" DataField="DateCreated"
SortExpression="DateCreated"/>
</Columns>
</aspataGrid>
Please let me know if you have seen anything like this before.
I had a portal that worked before, and over 5 months period JavaScript
errors started to show up on all forms where I have datagrids.
Using: IE 6.0, WIN XP, IIS 5.1, Framework 1.1
error: Expected ';'
The only JavaScript there is given to my by .NET:
<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
theform = document.forms["ZoneList:_ctl0"];
}
else {
theform = document.ZoneList:_ctl0;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
This is the datagrid:
<aspataGrid id="MyList" runat="server" width="55%"
BorderColor="#ffffff"
GridLines="none"
cellpadding="1"
cellspacing="0"
ItemStyle-CssClass="item"
HeaderStyle-ForeColor="white"
HeaderStyle-CssClass="GridHeader"
HeaderStyle-Height="19"
AlternatingItemStyle-CssClass="alternating"
AllowPaging="True"
OnPageIndexChanged="PageList"
PagerStyle-Mode="NumericPages"
PagerStyle-ForeColor="Black"
PagerStyle-HorizontalAlign="right"
PagerStyle-CssClass="pager"
PageSize="10"
AllowSorting="true"
OnSortCommand="SortCommand_OnClick"
AutoGenerateColumns="false"
DataKeyField="ZoneID">
<Columns>
<asp:TemplateColumn HeaderText="">
<ItemTemplate>
<asp:CheckBox id="Checkbox" Value="andy" runat="server" />
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="">
<ItemTemplate>
<asp:Label visible="false" id="ZoneID" runat="server" Text='<%#
DataBinder.Eval(Container.DataItem, "ZoneID") %>' />
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Zone Name" SortExpression="ZoneName">
<ItemTemplate>
<a href="Zone_view.aspx?ZoneID=<%# DataBinder.Eval(Container.DataItem,
"ZoneID") %>" class="regLink"><%# DataBinder.Eval(Container.DataItem,
"ZoneName") %></a>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn HeaderText="Internal Name" DataField="ZoneInternalName"
SortExpression="ZoneInternalName"/>
<asp:BoundColumn HeaderText="Date Created" DataField="DateCreated"
SortExpression="DateCreated"/>
</Columns>
</aspataGrid>
Please let me know if you have seen anything like this before.