skykingjwc
asked on
AJAX Animation causing IE to display "Errors on page" in status bar
I am playing with the ajax animation extender. I have a simple web page with a couple updatepanels, a drop down, and a textbox. When ever I click the 'Show Panel' button on the page the panel fades in as it is supposed to. There is a close button on the panel that will cause the panel to fade out. If I click Show then Close then Show again IE will say "Error on page" on line 793. There is no line 793 on my page.
This is my page
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
<!--
.flyout {position: absolute; left: 300px; top: 50px; border: thin solid black; height:300px; width:300px; filter: progid:DXImageTransform.Mi crosoft.Al pha(opacit y=0);}
-->
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:FormView ID="FormView1" runat="server" DefaultMode="Insert" Width="268px">
<EditItemTemplate>
FName:
<asp:TextBox ID="FNameTextBox" runat="server" Text='<%# Bind("FName") %>'>
</asp:TextBox><br />
LName:
<asp:TextBox ID="LNameTextBox" runat="server" Text='<%# Bind("LName") %>'>
</asp:TextBox><br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
Text="Update">
</asp:LinkButton>
<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
Text="Cancel">
</asp:LinkButton>
</EditItemTemplate>
<InsertItemTemplate>
FName:
<asp:TextBox ID="FNameTextBox" runat="server" Text='<%# Bind("FName") %>'>
</asp:TextBox>
<br />
LName: <asp:TextBox ID="LNameTextBox" runat="server" Text='<%# Bind("LName") %>'>
</asp:TextBox>
<br />
<br />
Other Stuff
<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
<asp:SqlDataSource ID="drop" runat="server" ConnectionString="<%$ ConnectionStrings:testDb %>"
SelectCommand="SELECT [otherstuff] FROM [names]"></asp:SqlDataSour ce>
<br />
<br />
<asp:Button ID="Button1" runat="server" CommandName="INSERT" Text="Do It. Do It." /><br />
<br />
<br />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>< br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
Text="Insert" OnClick="InsertButton_Clic k">
</asp:LinkButton>
</InsertItemTemplate>
<ItemTemplate>
FName:
<asp:Label ID="FNameLabel" runat="server" Text='<%# Bind("FName") %>'></asp:Label><br />
LName:
<asp:Label ID="LNameLabel" runat="server" Text='<%# Bind("LName") %>'></asp:Label><br />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New"
Text="New">
</asp:LinkButton>
</ItemTemplate>
</asp:FormView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="reload" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="addbutton" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<div class="flyout" id="Panel1">
Add to dropdown<br />
<asp:TextBox ID="Paneladdme" runat="server"></asp:TextB ox>
<asp:Button ID="addbutton" runat="server" OnClick="PaneladdButton_Cl ick" Text="Add" /> <br />
<asp:Button ID="close" runat="server" OnClick="closebuttonclick" Text="Close" /> <br />
<br />
<br />
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:Button ID="show" runat="server" OnClientClick="return false;" Text="Show Panel"/><br />
<asp:Button ID="reload" runat="server" Text="Refresh" /><br />
<ajaxToolkit:Animati onExtender ID="AnimationExtender3" runat="server" TargetControlID="show">
<Animations>
<OnClick>
<Sequence>
<Pulse AnimationTarget="Panel1" Duration=".05" Iterations="2"/>
</Sequence>
</OnClick>
</Animations>
</ajaxToolkit:AnimationExt ender>
</form>
</body>
</html>
This is my page
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
<!--
.flyout {position: absolute; left: 300px; top: 50px; border: thin solid black; height:300px; width:300px; filter: progid:DXImageTransform.Mi
-->
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:FormView ID="FormView1" runat="server" DefaultMode="Insert" Width="268px">
<EditItemTemplate>
FName:
<asp:TextBox ID="FNameTextBox" runat="server" Text='<%# Bind("FName") %>'>
</asp:TextBox><br />
LName:
<asp:TextBox ID="LNameTextBox" runat="server" Text='<%# Bind("LName") %>'>
</asp:TextBox><br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
Text="Update">
</asp:LinkButton>
<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
Text="Cancel">
</asp:LinkButton>
</EditItemTemplate>
<InsertItemTemplate>
FName:
<asp:TextBox ID="FNameTextBox" runat="server" Text='<%# Bind("FName") %>'>
</asp:TextBox>
<br />
LName: <asp:TextBox ID="LNameTextBox" runat="server" Text='<%# Bind("LName") %>'>
</asp:TextBox>
<br />
<br />
Other Stuff
<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
<asp:SqlDataSource ID="drop" runat="server" ConnectionString="<%$ ConnectionStrings:testDb %>"
SelectCommand="SELECT [otherstuff] FROM [names]"></asp:SqlDataSour
<br />
<br />
<asp:Button ID="Button1" runat="server" CommandName="INSERT" Text="Do It. Do It." /><br />
<br />
<br />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
Text="Insert" OnClick="InsertButton_Clic
</asp:LinkButton>
</InsertItemTemplate>
<ItemTemplate>
FName:
<asp:Label ID="FNameLabel" runat="server" Text='<%# Bind("FName") %>'></asp:Label><br />
LName:
<asp:Label ID="LNameLabel" runat="server" Text='<%# Bind("LName") %>'></asp:Label><br />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New"
Text="New">
</asp:LinkButton>
</ItemTemplate>
</asp:FormView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="reload" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="addbutton" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<div class="flyout" id="Panel1">
Add to dropdown<br />
<asp:TextBox ID="Paneladdme" runat="server"></asp:TextB
<asp:Button ID="addbutton" runat="server" OnClick="PaneladdButton_Cl
<asp:Button ID="close" runat="server" OnClick="closebuttonclick"
<br />
<br />
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:Button ID="show" runat="server" OnClientClick="return false;" Text="Show Panel"/><br />
<asp:Button ID="reload" runat="server" Text="Refresh" /><br />
<ajaxToolkit:Animati
<Animations>
<OnClick>
<Sequence>
<Pulse AnimationTarget="Panel1" Duration=".05" Iterations="2"/>
</Sequence>
</OnClick>
</Animations>
</ajaxToolkit:AnimationExt
</form>
</body>
</html>
ASKER
There is no line 793 in the source. Not even close.
IE Reports the following error.
Line: 793
Char: 9
Error: Member not found
Code: 0
URL : http://localhost:2125/AJAXTesting/Default.aspx
SOURCE FROM IE (as you can see there is no line 793)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
Untitled Page
</title>
<style type="text/css">
<!--
.flyout {position: absolute; left: 300px; top: 50px; border: thin solid black; height:300px; width:300px; filter: progid:DXImageTransform.Mi crosoft.Al pha(opacit y=0);}
-->
</style>
</head>
<body>
<form name="form1" method="post" action="Default.aspx" id="form1">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE3MDI3NDk wMTgPZBYCA gMPZBYCAgM PZBYCZg9kF gICAQ88KwA KAQAPFgQeC 18hRGF0YUJ vdW5kZx4LX yFJdGVtQ29 1bnRmZBYCZ g9kFgZmDw8 WAh4HVmlza WJsZWhkZAI BD2QWAmYPZ BYCAgUPEA8 WAh8AZ2RkZ GQCAg8PFgI fAmhkZBgBB QlGb3JtVml ldzEPFCsAB mRkAgJkZBY AZPUWQspeG DKLMf5A5UV E6faNtWsN" />
</div>
<script type="text/javascript">
<!--
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.valu e = eventTarget;
theForm.__EVENTARGUMENT.va lue = eventArgument;
theForm.submit();
}
}
// -->
</script>
<script src="/AJAXTesting/WebResou rce.axd?d= vnGi0rZact Wuf4iIBo-l Dw2&t= 6330827576 52716716" type="text/javascript"></s cript>
<script src="/AJAXTesting/ScriptRe source.axd ?d=boEap2l X9ZDAMPqUD GlbkyuWRgU l3n9kgWUc3 IP5ibO7N7f _gjpF-Rcx5 i7VDcthdK5 9t2dLtQqmb rEI3dpyvfB GPC6_t0d5H 8H5FtX4te8 1&t=63 3083423066 554545" type="text/javascript"></s cript>
<script src="/AJAXTesting/ScriptRe source.axd ?d=boEap2l X9ZDAMPqUD GlbkyuWRgU l3n9kgWUc3 IP5ibO7N7f _gjpF-Rcx5 i7VDcthdK5 9t2dLtQqmb rEI3dpyvfX GmiWvt1wnp BXVBAIbmcW n6l0nImBKQ OI2gMObFdh A0&t=6 3308342306 6554545" type="text/javascript"></s cript>
<script src="/AJAXTesting/ScriptRe source.axd ?d=6GSy8RX t1hzTkvjrB 3svrPqhhog GQXGsL4vKV Zsf50P0UM5 mu_AbOjcFS Ze2m9k3Bbv UrqQ0_GPYA l43SrQ6rw2 &t=633 0593796000 00000" type="text/javascript"></s cript>
<script src="/AJAXTesting/ScriptRe source.axd ?d=6GSy8RX t1hzTkvjrB 3svrPqhhog GQXGsL4vKV Zsf50PKvxG HWvXUUj1Fg A_h1cFtvLN TRYIElTGFy FYkcnzMoA2 &t=633 0593796000 00000" type="text/javascript"></s cript>
<script src="/AJAXTesting/ScriptRe source.axd ?d=6GSy8RX t1hzTkvjrB 3svrPqhhog GQXGsL4vKV Zsf50Mci8v WYhWq5VCdu 5jTUtokykf bbWth3neqM QmBwPn6Ug2 &t=633 0593796000 00000" type="text/javascript"></s cript>
<script src="/AJAXTesting/ScriptRe source.axd ?d=6GSy8RX t1hzTkvjrB 3svrPqhhog GQXGsL4vKV Zsf50N626i 61wLoq1TF8 8mp9grAVS- ocl-Q3qqQF TpT_SPt2mK h-kph2Hg4F ZL8PJcJ15k 1&t=63 3059379600 000000" type="text/javascript"></s cript>
<script src="/AJAXTesting/ScriptRe source.axd ?d=6GSy8RX t1hzTkvjrB 3svrPqhhog GQXGsL4vKV Zsf50Mci8v WYhWq5VCdu 5jTUtok12b g29KueDW2C UohK-LrlHP 5FtMd1DIi5 SouJQId3k4 1&t=63 3059379600 000000" type="text/javascript"></s cript>
<script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestMa nager._ini tialize('S criptManag er1', document.getElementById('f orm1'));
Sys.WebForms.PageRequestMa nager.getI nstance(). _updateCon trols(['tU pdatePanel 1','tUpdat ePanel2'], ['reload','addbutton'], [], 90);
//]]>
</script>
<div id="UpdatePanel1">
<table cellspacing="0" border="0" id="FormView1" style="width:268px;border- collapse:c ollapse;">
<tr>
<td colspan="2">
FName:
<input name="FormView1$FNameTextB ox" type="text" id="FormView1_FNameTextBox " />
<br />
LName: <input name="FormView1$LNameTextB ox" type="text" id="FormView1_LNameTextBox " />
<br />
<br />
Other Stuff
<select name="FormView1$DropDownLi st1" id="FormView1_DropDownList 1">
</select>
<br />
<br />
<input type="submit" name="FormView1$Button1" value="Do It. Do It." id="FormView1_Button1" /><br />
<br />
<br />
<span id="FormView1_Label1">Labe l</span><b r />
<a id="FormView1_InsertButton " href="javascript:__doPostB ack('FormV iew1$Inser tButton',' ')">Insert </a>
</td>
</tr>
</table>
</div>
<br />
<div id="UpdatePanel2">
<div class="flyout" id="Panel1">
Add to dropdown<br />
<input name="Paneladdme" type="text" id="Paneladdme" />
<input type="submit" name="addbutton" value="Add" id="addbutton" /> <br />
<input type="submit" name="close" value="Close" id="close" /> <br />
<br />
<br />
</div>
</div>
<br />
<input type="submit" name="show" value="Show Panel" onclick="return false;" id="show" /><br />
<input type="submit" name="reload" value="Refresh" id="reload" /><br />
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWCgKw2eajDQKytfK 4CgL069ApA rrQ09gDAov 75dsMAuqCy QYC2d7PiQw Cx/yG/QwCv IvsxA4CocS p8QX0iQfbL l0RiLTp5Fl WP3isgtU6r g==" />
</div>
<script type="text/javascript">
<!--
Sys.Application.initialize ();
Sys.Application.add_init(f unction() {
$create(AjaxControlToolkit .Animation .Animation Behavior, {"OnClick":"{\"AnimationNa me\":\"Seq uence\",\" AnimationC hildren\": [{\"Animat ionName\": \"Pulse\", \"Animatio nTarget\": \"Panel1\" ,\"Duratio n\":\".05\ ",\"Iterat ions\":\"2 \",\"Anima tionChildr en\":[]}]} ","id":"An imationExt ender3"}, null, null, $get("show"));
});
// -->
</script>
</form>
</body>
</html>
IE Reports the following error.
Line: 793
Char: 9
Error: Member not found
Code: 0
URL : http://localhost:2125/AJAXTesting/Default.aspx
SOURCE FROM IE (as you can see there is no line 793)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
Untitled Page
</title>
<style type="text/css">
<!--
.flyout {position: absolute; left: 300px; top: 50px; border: thin solid black; height:300px; width:300px; filter: progid:DXImageTransform.Mi
-->
</style>
</head>
<body>
<form name="form1" method="post" action="Default.aspx" id="form1">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE3MDI3NDk
</div>
<script type="text/javascript">
<!--
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.valu
theForm.__EVENTARGUMENT.va
theForm.submit();
}
}
// -->
</script>
<script src="/AJAXTesting/WebResou
<script src="/AJAXTesting/ScriptRe
<script src="/AJAXTesting/ScriptRe
<script src="/AJAXTesting/ScriptRe
<script src="/AJAXTesting/ScriptRe
<script src="/AJAXTesting/ScriptRe
<script src="/AJAXTesting/ScriptRe
<script src="/AJAXTesting/ScriptRe
<script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestMa
Sys.WebForms.PageRequestMa
//]]>
</script>
<div id="UpdatePanel1">
<table cellspacing="0" border="0" id="FormView1" style="width:268px;border-
<tr>
<td colspan="2">
FName:
<input name="FormView1$FNameTextB
<br />
LName: <input name="FormView1$LNameTextB
<br />
<br />
Other Stuff
<select name="FormView1$DropDownLi
</select>
<br />
<br />
<input type="submit" name="FormView1$Button1" value="Do It. Do It." id="FormView1_Button1" /><br />
<br />
<br />
<span id="FormView1_Label1">Labe
<a id="FormView1_InsertButton
</td>
</tr>
</table>
</div>
<br />
<div id="UpdatePanel2">
<div class="flyout" id="Panel1">
Add to dropdown<br />
<input name="Paneladdme" type="text" id="Paneladdme" />
<input type="submit" name="addbutton" value="Add" id="addbutton" /> <br />
<input type="submit" name="close" value="Close" id="close" /> <br />
<br />
<br />
</div>
</div>
<br />
<input type="submit" name="show" value="Show Panel" onclick="return false;" id="show" /><br />
<input type="submit" name="reload" value="Refresh" id="reload" /><br />
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWCgKw2eajDQKytfK
</div>
<script type="text/javascript">
<!--
Sys.Application.initialize
Sys.Application.add_init(f
$create(AjaxControlToolkit
});
// -->
</script>
</form>
</body>
</html>
Oh, there is a line 793 - it just isn't where you are expecting it.
Step through the code with a debugger to find the *real* problem.
Step through the code with a debugger to find the *real* problem.
the error is probably in one of the /AJAXTesting/ScriptResourc e.axd s included, as seen on source.
you might want to consider some javascript error handling functions, and re attach the event handlers to the buttons on js failure
you might want to consider some javascript error handling functions, and re attach the event handlers to the buttons on js failure
ASKER
A little new to AJAX and ASP here. Converted from PHP recently. I am not quite sure how to use VS 2005 to step through the program. I did figure out the problem myself though. If you could provide some instruction on how to debug in VS or a link to some instructions or somethign that would be great.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The second link is not handled correctly by EE. It should include the part in parentheses and the filename extension. You will need to copy the URL to your browser's address bar instead of clicking on the link EE makes.
http://msdn2.microsoft.com/en-us/library/k2h50zzs(VS.80).aspx
http://msdn2.microsoft.com/en-us/library/k2h50zzs(VS.80).aspx
ASKER
Nice that was exactly what I was looking for. I just didn't know the correct terminology.
Great! I'm glad I could help. Thanks for the grade, the points and the fun question.
bol
bol
Show us the html source code for that part of the page and point out the line. If there is a better error in the box then provide it please. You may also need to provide html source for other parts of the page (i.e. script tags, etc) for functions, etc used on those lines.
Let me know if you have a question.
bol