This is a migrated thread and some comments may be shown as answers.

Script alert some times

3 Answers 69 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
sunny
Top achievements
Rank 1
sunny asked on 13 May 2009, 01:12 PM
Hi Its Shrawan from a:m tech Hyd,

I am experiencing a problem while using RadAjaxmanager and RadAjaxLoadingPanel in Mozilla 3

http://loveletters.ie/getquote.aspx 

I have placed one grid and a table id in as updated controls in radAjaxmanager on clicking an image button, Its working fine in IE wgere as when come to mozilla 3.0 its dispalying a script alert with

"

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near '

<!DOCTYPE html PUB'. "

and in both the browsers i am not getting loading panel image and also no transparency effect working,

Can u please look in to this and suggets me  a solution

Thanking you

Sravan

this my design page

 

<%

@ Page Language="C#" AutoEventWireup="true" CodeFile="getQuote.aspx.cs" Inherits="getQuote" %>

 

<%

@ Register Src="blackTable1.ascx" TagName="blackTable" TagPrefix="uc2" %>

 

<%

@ Register Src="footernav.ascx" TagName="footernav" TagPrefix="uc4" %>

 

<%

@ Register Src="topRightStrip.ascx" TagName="topRightStrip" TagPrefix="uc3" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="radA" %>

 

 

 

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

html xmlns="http://www.w3.org/1999/xhtml">

 

<

head>

 

<

meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

 

<

title>Welcome to Loveletters</title>

 

<

link href="includes/css/style.css" type="text/css" rel="stylesheet" />

 

<

link href="includes/css/inner_style.css" type="text/css" rel="stylesheet" />

 

<

script type="text/javascript" src="includes/scripts/rollover.js"></script>

 

<

script language="javascript">

 

 

 

 

function OnRequestStart(sender, args)

 

{

 

//alert(args.EventTarget);

 

 

 

 

if(args.EventTarget=="imgButton2")

 

{

showTab();

 

return true;

 

}

 

else if(args.EventTarget=="imgButton")

 

{

showTab();

 

return true;

 

}

}

 

 

function showTab()

 

{

window.document.getElementById(

"tblResult").style.display="";

 

window.document.getElementById(

"imgButton2").focus();

 

 

}

 

 

function chkNumeric(oSrc,args)

 

{

 

//alert(args.Value);

 

 

 

 

//args.IsValid = false;

 

 

 

 

 

var strValidChars = "0123456789";

 

 

var strChar;

 

 

var blnResult = true;

 

 

if (args.Value.length == 0)

 

blnResult=

false;

 

 

// test strString consists of valid characters listed above

 

 

 

 

for (i = 0; i < args.Value.length && blnResult == true; i++)

 

{

strChar = args.Value.charAt(i);

 

if (strValidChars.indexOf(strChar) == -1)

 

{

blnResult =

false;

 

}

}

args.IsValid=blnResult;

}

 

 

</

script>

 

</

head>

 

<

body onload="MM_preloadImages('images/order_stationery_m.gif','images/collection_m.gif')">

 

<

form runat="server" id="frmQuote">

 

 

 

 

 

<!-- ancilary div start -->

 

 

 

<

div id="ancilar_nav">

 

 

 

 

 

<!-- navagation start -->

 

 

 

 

<div id="div_navgation">

 

 

 

 

<uc3:topRightStrip runat="server" ID="strip" />

 

 

 

 

</div>

 

 

 

 

 

 

 

 

<!-- ancilary div end -->

 

 

 

</div>

 

 

 

 

 

<!-- logo_nav div start -->

 

 

 

 

<div id="logo_nav">

 

 

 

 

 

<!-- div logo start -->

 

 

 

 

<div id="logo">

 

 

 

 

<a href="index.aspx"><img src="images/logo.jpg" height="33" width="225" alt="Love Letters " border="0" /></a>

 

 

 

 

<!-- div logo end -->

 

 

 

 

</div>

 

 

 

 

 

 

<!-- div nav start -->

 

 

 

<div id="main_nav">

 

 

 

 

 

 

 

<a href="the_collection.aspx" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('the_collection','','images/collection_m.gif',1)"><img src="images/collection_n.gif" alt="The Collection" name="the_collection" width="146" height="16" border="0" id="the_collection" /></a>&nbsp;&nbsp;&nbsp;&nbsp;

 

 

 

 

<a href="order_stationery.aspx" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('order_stationery','','images/order_stationery_m.gif',1)"><img src="images/order_stationery_n.gif" alt="Order Stationery" name="order_stationery" width="163" height="16" border="0" id="order_stationery" /></a>&nbsp;&nbsp;&nbsp;&nbsp;

 

 

 

 

<a href="bride_testimonials.aspx" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('bride_testimonials','','images/bride_testimonials_m.gif',1)"><img src="images/bride_testimonials_n.gif" alt="Bride Testimonials" name="bride_testimonials" width="178" height="16" border="0" id="bride_testimonials" /></a></div>

 

 

 

 

 

<div class="div_clear"></div>

 

 

 

 

<!-- logo_nav div end -->

 

 

 

 

</div>

 

 

 

 

 

 

<!-- div inner contant start -->

 

 

 

<

div id="inner_content">

 

 

 

 

 

<!-- div inner banner start -->

 

 

 

 

<div id="inner_banner">

 

 

 

 

<img src="images/banners/banner_get_a_quote.jpg" alt="Get a Quote" border="0" />

 

 

 

 

<!-- div inner banner end -->

 

 

 

 

</div>

 

 

 

 

 

 

<!-- print_page start -->

<!-- content sec start -->

 

 

<

div id="content_sec">

 

 

 

 

 

 

<p>&nbsp;</p>

 

 

 

 

 

<radA:RadScriptManager ID="RadScriptManager1" runat="server"></radA:RadScriptManager>

 

 

 

 

<asp:ImageButton runat="server" ID="imgButton" ImageUrl="images/btn_get_a_quote.gif" alt="" align="right" OnClick="imgButton2_Click"/><br />

 

 

 

 

<br />

 

 

 

 

<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tab2" >

 

 

 

 

<tr>

 

 

 

 

<td width="181" class="row3">&nbsp;</td>

 

 

 

 

<td width="149" class="row3" style="border-right: solid 1px #e3e3e3"><img src="images/t_simple.gif" /></td>

 

 

 

 

<td width="142" class="row3" style="border-right: solid 1px #e3e3e3"><img src="images/t_self-assembly.gif" /></td>

 

 

 

 

<td width="145" class="row3" style="border-right: solid 1px #e3e3e3"><img src="images/t_stylish.gif" /></td>

 

 

 

 

<td width="140" class="row3" style="border-right: solid 1px #e3e3e3"><img src="images/t_sumptuous.gif" /></td>

 

 

 

 

</tr>

 

 

 

 

</table>

 

 

 

 

<asp:DataGrid runat="server" ID="dgQuote" AutoGenerateColumns="false" CellSpacing="0" Width="780" CssClass="tab2" CellPadding="0">

 

 

 

 

<HeaderStyle CssClass="header" />

 

 

 

 

<AlternatingItemStyle CssClass="row4" />

 

 

 

 

<ItemStyle CssClass="row3" />

 

 

 

 

<Columns>

 

 

 

 

<asp:TemplateColumn HeaderText="Qty" HeaderStyle-CssClass="header" >

 

 

 

 

<ItemTemplate>

 

 

 

 

<input name="txtQty" type="text" class="text_normal1" id="txtQty" runat="server" />

 

 

 

 

<asp:CustomValidator runat="server" ID="regQty" ClientValidationFunction="chkNumeric" ControlToValidate="txtQty" ErrorMessage="Invalid" Display="dynamic" SetFocusOnError="true" ></asp:CustomValidator>

 

 

 

 

</ItemTemplate>

 

 

 

 

</asp:TemplateColumn>

 

 

 

 

<asp:BoundColumn ItemStyle-Width="15%" HeaderStyle-Width ="15%" DataField="cardtype" HeaderText="Items" HeaderStyle-CssClass="header" ></asp:BoundColumn>

 

 

 

 

<asp:TemplateColumn HeaderText="Unit Price" HeaderStyle-CssClass="header" >

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:Label Width="50" name="txtUPriceA" CssClass="text_pink" ID="txtUPriceA" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"A_Price") %>' />

 

 

 

 

</ItemTemplate>

 

 

 

 

</asp:TemplateColumn>

 

 

 

 

<asp:TemplateColumn HeaderStyle-CssClass="header" HeaderText="Total" >

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:Label Width="50" name="txtTotalA" CssClass="text_normal2" ID="txtTotalA" runat="server" Text="&nbsp;" />

 

 

 

 

</ItemTemplate>

 

 

 

 

</asp:TemplateColumn>

 

 

 

 

<asp:TemplateColumn HeaderText="Unit Price" HeaderStyle-CssClass="header" >

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:Label Width="50" name="txtUPriceSelf" CssClass="text_orange" ID="txtUPriceSelf" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"self") %>' />

 

 

 

 

</ItemTemplate>

 

 

 

 

</asp:TemplateColumn>

 

 

 

 

<asp:TemplateColumn HeaderStyle-CssClass="header" HeaderText="Total" >

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:Label Width="50" name="txtTotalSelf" CssClass="text_normal2" ID="txtTotalSelf" runat="server" Text="&nbsp;" />

 

 

 

 

</ItemTemplate>

 

 

 

 

</asp:TemplateColumn>

 

 

 

 

<asp:TemplateColumn HeaderText="Unit Price" HeaderStyle-CssClass="header" >

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:Label Width="50" name="txtUPriceB" CssClass ="text_green" ID="txtUPriceB" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"B_Price") %>' />

 

 

 

 

</ItemTemplate>

 

 

 

 

</asp:TemplateColumn>

 

 

 

 

<asp:TemplateColumn HeaderStyle-CssClass="header" HeaderText="Total" >

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:Label Width="50" name="txtTotalB" CssClass="text_normal2" ID="txtTotalB" runat="server" Text="&nbsp;" />

 

 

 

 

</ItemTemplate>

 

 

 

 

</asp:TemplateColumn>

 

 

 

 

<asp:TemplateColumn HeaderText="Unit Price" HeaderStyle-CssClass="header" >

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:Label Width="50" name="txtUPriceC" CssClass="text_blue" ID="txtUPriceC" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"C_Price") %>' />

 

 

 

 

</ItemTemplate>

 

 

 

 

</asp:TemplateColumn>

 

 

 

 

<asp:TemplateColumn HeaderStyle-CssClass="header" HeaderText="Total" >

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:Label Width="50" name="txtTotalC" CssClass="text_normal2" ID="txtTotalC" runat="server" Text="&nbsp;" />

 

 

 

 

</ItemTemplate>

 

 

 

 

</asp:TemplateColumn>

 

 

 

 

</Columns>

 

 

 

 

</asp:DataGrid>

 

 

 

 

<table width="780" border="0" cellpadding="0" cellspacing="0" class="tab2" style="display:none;" id="tblResult">

 

 

 

 

<tr class="row5">

 

 

 

 

<td width="30%" colspan="2" ><strong>Total in Euro</strong></td>

 

 

 

 

<td >Simple</td>

 

 

 

 

<td ><strong><asp:Label runat="server" ID="simpleTotal"></asp:Label></strong></td>

 

 

 

 

<td >Self-

 

 

<br />

 

 

 

assembly

<br /></td>

 

 

 

 

<td ><strong><asp:Label runat="server" id="selfTotal"/></strong></td>

 

 

 

 

<td >Stylish</td>

 

 

 

 

<td ><strong><asp:Label runat="server" id="stylishTotal"/></strong></td>

 

 

 

 

<td >Sumptuous</td>

 

 

 

 

<td ><strong><asp:Label runat="server" id="sumptuousTotal"/></strong></td>

 

 

 

 

</tr>

 

 

 

 

</table>

 

 

 

 

<p>

 

 

 

 

<asp:ImageButton runat="server" ID="imgButton2" ImageUrl="images/btn_get_a_quote.gif" alt="" align="right" OnClick="imgButton2_Click" />

 

 

 

 

</p><br />

 

<

br /><!--style="width:320px;padding-top:2px;"-->

 

 

 

<

radA:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Transparency="0">

 

 

 

 

<asp:Image ID="Image2" runat="server" AlternateText="Loading..." ImageUrl="~/RadControls/Ajax/Skins/Default/Loading3.gif" />

 

</

radA:RadAjaxLoadingPanel>

 

<

radA:RadAjaxManager ID="radMngr1" runat="server">

 

 

 

 

<ClientEvents OnRequestStart="OnRequestStart" />

 

 

<AjaxSettings>

 

 

 

 

<radA:AjaxSetting AjaxControlID="imgButton">

 

 

 

 

<UpdatedControls>

 

 

 

 

<radA:AjaxUpdatedControl ControlID="tblResult" LoadingPanelID="AjaxLoadingPanel1" />

 

 

 

 

<radA:AjaxUpdatedControl ControlID="dgQuote" />

 

 

 

 

<radA:AjaxUpdatedControl ControlID="simpleTotal" />

 

 

 

 

<radA:AjaxUpdatedControl ControlID="selfTotal" />

 

 

 

 

<radA:AjaxUpdatedControl ControlID="stylishTotal" />

 

 

 

 

<radA:AjaxUpdatedControl ControlID="sumptuousTotal" />

 

 

 

 

</UpdatedControls>

 

 

 

 

</radA:AjaxSetting>

 

 

 

 

<radA:AjaxSetting AjaxControlID="imgButton2">

 

 

 

 

<UpdatedControls>

 

 

 

 

<radA:AjaxUpdatedControl ControlID="tblResult" LoadingPanelID="AjaxLoadingPanel1" />

 

 

 

 

<radA:AjaxUpdatedControl ControlID="dgQuote" />

 

 

 

 

<radA:AjaxUpdatedControl ControlID="simpleTotal" />

 

 

 

 

<radA:AjaxUpdatedControl ControlID="selfTotal" />

 

 

 

 

<radA:AjaxUpdatedControl ControlID="stylishTotal" />

 

 

 

 

<radA:AjaxUpdatedControl ControlID="sumptuousTotal" />

 

 

 

 

</UpdatedControls>

 

 

 

 

</radA:AjaxSetting>

 

 

 

 

</AjaxSettings>

 

</

radA:RadAjaxManager>

 

 

 

 

</div>

 

 

 

 

 

<div class="div_clear"></div>

 

 

 

 

<!-- div inner contant end -->

 

 

 

</

div>

 

 

 

 

 

<!-- footer div start -->

 

 

 

 

<uc2:blackTable ID="BlackTable1" runat="server" />

 

 

 

 

 

<!-- div credit start -->

 

 

 

 

<div id="credit">

 

 

 

 

<a href="about_us.htm">About Us</a> &nbsp;|&nbsp; <a href="price_list.htm">Price List</a> &nbsp;|&nbsp; <a href="recommended_suppliers.htm">Recommended Suppliers</a> &nbsp;|&nbsp; <a href="#">Press</a> &nbsp;|&nbsp; <a href="events.htm">News &amp; Events</a> &nbsp;|&nbsp; <a href="privacy.htm">Privacy</a> &nbsp;|&nbsp; <a href="terms_conditions.htm">Terms & Conditions</a><br />

 

 

 

 

&copy; LOVE LETTERS</div>

 

 

 

 

 

<div id="amweb"><a href="http://www.amweb.ie" target="_blank">Web design</a> &amp; <a href="http://www.amweb.ie" target="_blank">development</a> by <a href="http://www.amweb.ie" target="_blank"><em>am web</em></a> </div>

 

 

 

 

</form>

 

</

body>

 

</

html>

 

 

 

 

and coding page

 

 

using

System;

 

 

 

 

using

System.Data;

 

 

 

 

using

System.Configuration;

 

 

 

 

using

System.Collections;

 

 

 

 

using

System.Web;

 

 

 

 

using

System.Web.Security;

 

 

 

 

using

System.Web.UI;

 

 

 

 

using

System.Web.UI.WebControls;

 

 

 

 

using

System.Web.UI.WebControls.WebParts;

 

 

 

 

using

System.Web.UI.HtmlControls;

 

 

 

 

//public partial class getQuote : System.Web.UI.Page

 

 

 

public

partial class getQuote : Telerik.Web.UI.RadAjaxPage

 

 

 

 

{

 

DataTable myTab;

 

 

Functions objFun = new Functions();

 

 

Double dblsimpleTotal, dblselfTotal, dblstylishTotal, dblsumptuousTotal;

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

if (!IsPostBack)

 

displayGrid();

 

}

 

void displayGrid()

 

{

myTab = objFun.GetRecords(

"select cardtype,'A_price'=convert(decimal(10,2),a_price),'b_price'=convert(decimal(10,2),b_price),'c_price'=convert(decimal(10,2),c_price),'self'=convert(decimal(10,2),self) from cardprice order by cardtype");

 

dgQuote.DataSource = myTab;

dgQuote.DataBind();

}

 

protected void imgButton2_Click(object sender, ImageClickEventArgs e)

 

{

 

Label txtUPriceA,txtTotalA, txtUPriceSelf, txtTotalSelf, txtUPriceB, txtTotalB, txtUPriceC, txtTotalC;

 

 

HtmlInputText txtQty;

 

 

 

 

for (int i = 0; i <= dgQuote.Items.Count - 1;i++ )

 

{

txtQty = dgQuote.Items[i].FindControl(

"txtQty") as HtmlInputText;

 

txtUPriceA = dgQuote.Items[i].FindControl(

"txtUPriceA") as Label;

 

txtTotalA = dgQuote.Items[i].FindControl(

"txtTotalA") as Label;

 

txtUPriceSelf = dgQuote.Items[i].FindControl(

"txtUPriceSelf") as Label;

 

txtTotalSelf = dgQuote.Items[i].FindControl(

"txtTotalSelf") as Label;

 

txtUPriceB = dgQuote.Items[i].FindControl(

"txtUPriceB") as Label;

 

txtTotalB = dgQuote.Items[i].FindControl(

"txtTotalB") as Label;

 

txtUPriceC = dgQuote.Items[i].FindControl(

"txtUPriceC") as Label;

 

txtTotalC = dgQuote.Items[i].FindControl(

"txtTotalC") as Label;

 

 

if (txtQty.Value == "")

 

{

 

//txtQty.Value = "0";

 

 

 

 

txtTotalA.Text =

"&nbsp;";

 

txtTotalSelf.Text =

"&nbsp;";

 

txtTotalB.Text =

"&nbsp;";

 

txtTotalC.Text =

"&nbsp;";

 

}

 

else

 

 

 

 

{

txtTotalA.Text =

Convert.ToDouble(Convert.ToDouble(txtUPriceA.Text) * Convert.ToInt16(txtQty.Value)).ToString();

 

dblsimpleTotal +=

Convert.ToDouble(txtTotalA.Text);

 

txtTotalSelf.Text =

Convert.ToDouble(Convert.ToDouble(txtUPriceSelf.Text) * Convert.ToInt16(txtQty.Value)).ToString();

 

dblselfTotal +=

Convert.ToDouble(txtTotalSelf.Text);

 

txtTotalB.Text =

Convert.ToDouble(Convert.ToDouble(txtUPriceB.Text) * Convert.ToInt16(txtQty.Value)).ToString();

 

dblstylishTotal +=

Convert.ToDouble(txtTotalB.Text);

 

txtTotalC.Text =

Convert.ToDouble(Convert.ToDouble(txtUPriceC.Text) * Convert.ToInt16(txtQty.Value)).ToString();

 

dblsumptuousTotal +=

Convert.ToDouble(txtTotalC.Text);

 

}

}

simpleTotal.Text =

String.Format("{0:0.00}", dblsimpleTotal); //dblsimpleTotal.ToString();

 

 

 

 

stylishTotal.Text =

String.Format("{0:0.00}", dblstylishTotal); //dblstylishTotal.ToString();

 

 

 

 

selfTotal.Text =

String.Format("{0:0.00}", dblselfTotal); //dblselfTotal.ToString();

 

 

 

 

sumptuousTotal.Text =

String.Format("{0:0.00}", dblsumptuousTotal); //dblsumptuousTotal.ToString();

 

 

 

 

}

}

 


3 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 16 May 2009, 01:56 PM
Hello sunny,

Try setting the runat property of the problematic table to server and see if the issue persists.
Let me know how it goes.

Kind regards,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
sunny
Top achievements
Rank 1
answered on 19 May 2009, 07:12 AM

Hi Lana,Telerik

I have tried defining my table with runat server attribute, But the problem was not resolved,

 

instead the table is visible for a while and hiding,

 

i have the same problem in another site also http://gco2.ie/quick_offset.aspx  try orderrin the amount Its giving script alert many a times there i haven't  used table its  asp:lable  web control Still same problem

Thanks & regards
Sravan

 

0
Iana Tsolova
Telerik team
answered on 19 May 2009, 09:22 AM
Hi sunny,

I went again through your code. And I can see that the tblResult is being hidden on RequestStart of the RadAjaxManager and same time it is set as updated control in the ajax settings. However, it is not suggested to have controls which change there visibility taking part in ajax settings. Therefore I suggest that you wrap the table into an ASP:Panel control and ajaxify it instead.
Additionally, if you could send us a runnable project (in a formal support ticket) illustrating the errorneous behavior would be of help. Thus I could debug it locally in order to get to the source of the problem.

Sincerely yours,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Ajax
Asked by
sunny
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
sunny
Top achievements
Rank 1
Share this question
or