Showing posts with label firefox. Show all posts
Showing posts with label firefox. Show all posts

Monday, March 26, 2012

PageRequestManagerParserErrorException in Firefox 2

Hi,

My website is using Ajax with UpdatePanel which is working well in IE 7. However, I keep getting the PageRequestManagerParserErrorException when I am testing it in Firefox 2. I am currently using the AJAX Beta 2. I also check to make sure there is no Response.Write while the page is postback. But the error keep poping up in Firefox. Does any know a solution for this?


Many thanks.


hello. can you biuld a simple demo page that reproduces this?

Mine does the same thing. I have Release Canidate. If I refresh the page the error goes away. If you hold your mouse over a button that has a hover event it flashes and you have to click at just the right time. The cursor blinks in the field that has focus as well andt he tab key didn't work. Not sure if I can figure what part to post but I will let you know what I find out.

Good luck

Wednesday, March 21, 2012

Parse Error from ScriptResource.axd in MicrosoftAjax.js

Upgraded to RC1. Works in Firefox for MAC and some MACs with Safari.

But on some Safari installations we are getting Parse Error at line five of MicrosoftAjax.js.

So, basically the entire ATlas package is not being recognized on some Safari installations.

Updatin MAC software on those machines did not help.

Question: Is there a way to create a custom ScriptResource.axd that includes a custom MicrosoftAjax.js?

Thanks in advance.

hello.
scriptresource.axd is a handler used to serve embedded js files. it runs only in the server, so there shouldn't be any issues with it. btw, can you use sniffer and see if you're getting the files correctly from the server?

It is getting to scriptresource.axd allright. It gets a parser error here:

// MicrosoftAjax.js
Function.__typeName="Function";Function.createCallback=function

The app was working with Beta 1.0 of Atlas on those MAC machines.

Failing machines: PowerMac using Safari 1.3.2 and there are no further software updates available from Apple on these machines.

Other MAC machine are still fine.

Will file a bug report with Apple and Microsoft.


Try running the app in debug mode or set ScriptMode="Debug" on the ScriptManager so that the debug scripts are used. That might help show where the error is really occuring.

Thanks,

Eilon

partial postback and FireFox

in FireFox, using javascript to call parent.__doPostback('mycontrol') seems to initiate the partial postback on the parent window, and you can see the UpdateProgress rotating Image, but it does not go away and the page never refreshes.

This works fine on IE and Opera - is this a known FireFox issue that the atlas team is working on?

Thanks in advance

hello.

any chance on providing a demo page that reproduces this problem?


Thanks for the reply Luis... unfortunately I don't have a demo page at hand, but will try to put one together if no-one else is already familiar with this particular issue.


hello.

well, you could also use fiddler to see what's getting passed from client to server and vice-versa...


FYI, this seems to have resolved itself with Beta 2

Correction, this still is not resolved - I was under the impression that it was fixed because calling __doPostBack with an eventtarget parameter that does not exist is causing a regular postback (a change from CTP)... you still cannot call __doPostBack() in hopes for a partial postback in FireFox.


I am having a similar problem as well. However i am initiating the partial page postback through a pop-up window. The pop-up window calls window.opener.__doPostBack(target, argument). The postback actually gets executed on the server, but the UpdatePanel on the underlying page does not get updated on FireFox. This works fine on IE.

Here is the source of a very simple page.

ASPX Page

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="sm1" runat="server" />
<asp:UpdatePanel id="updater" runat="server">
<ContentTemplate>
<asp:Label ID="serverTime" runat="server" /><br />
<asp:Button ID="getTime" Text="Get Server Time" runat="server" UseSubmitBehavior="false" OnClick="getTime_Click" /><br />
<a href="#" onclick="window.open('popupAjax.html','Popup','width=200,height=200');">Open Popup</a>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>

Code Behind

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;
using System.Threading;

public partialclass UpdatePanel : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
serverTime.Text = DateTime.Now.ToLongTimeString();
}
protected void getTime_Click(object sender, EventArgs e)
{
Thread.Sleep(1000); // Used just to similate processing of something.
serverTime.Text = DateTime.Now.ToLongTimeString();
}
}

Simple Popup Page

<!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>
<title>Untitled Page</title>
</head>
<body>
<a href="#" onclick="window.opener.__doPostBack('getTime','');window.close();">Update And Close Window</a>
</body>
</html>


In the example above I was using the latest ASP.NET AJAX Beta 2 build.

It seems you are having the same issue as I... the work-around we used for FireFox is to simply do a full postback - as follows:

if (opener.document.getElementById("__EVENTTARGET") !=null)

opener.document.getElementById("__EVENTTARGET").value ="XXXXXXXX";

if (opener.document.getElementById("__EVENTARGUMENT") !=null)

opener.document.getElementById("__EVENTARGUMENT").value ="";

opener.document.forms[0].submit();


hstechl:

It seems you are having the same issue as I... the work-around we used for FireFox is to simply do a full postback - as follows:

if (opener.document.getElementById("__EVENTTARGET") !=null)

opener.document.getElementById("__EVENTTARGET").value ="XXXXXXXX";

if (opener.document.getElementById("__EVENTARGUMENT") !=null)

opener.document.getElementById("__EVENTARGUMENT").value ="";

opener.document.forms[0].submit();

Where do you put this script ? In a client script block or ?


I would try the followings:

- I have problems in firefox 2.0 and ajax ctp/beta 1/beta 2 (rc1 not tested yet) when opening popups via javascript (strange javascipt errors, i have athread about it, but no response yet)

so instead of

<a href="#" onclick="window.open('popupAjax.html','Popup','width=200,height=200');">Open Popup</a>

try

<a target="_blank" href="popupAjax.html">Open Popup</a>

(I think this is better for the "modern" browsers, because you not force your user for a defined window size and the user could decide where to place our popups: in a new window?, in a new tab? However there is one drawback: you cannot close the popup by javascript without a security warningSmile )

- Maybe thedummy button trick is works for you (I am using it for ajax popups and parent update panels always). Not elegant but works.

Partial postback in IE7 and Firefox but full postback in IE6

I have a peculiar problem with ajax page not working the same way on IE6 (service pack 2) and on IE7 and Firefox…

IE7 and Firefox works perfectly and I have no complains but whenever I tried to run the page from other computers on the network (with IE6.0) the edit controls and listboxes blink when there is a partial postback which led me to suspect that maybe there is a problem with the java script and full postback is being performed.

I have not posted the code for the page because it's rather generic. I have Tab Control from ajaxtoolkit on the top of the page that switches panes with various edit boxes and list boxes and other common controls. And there is also a timer control within the update panel that triggers updates once a while (10s).

One last thing to note is that I have a listbox tool tip feature done in javascript that is also not displaying right or should I say at all except for some weird stuff sort of showing on the screen - a white outline of sorts of the tooltip. And this is all for IE6.0. Firefox is also not displaying the tooltip but that's not conerns the project since it is directed to work under IE.

Like I said IE7 (and somewhat Firefox) work perfectly…

Any help is appreciated.

Thanks,

Arek

I guess you're just experiencing typical IE6 flickering. If you have "Check for newer versions of stored pages" set to "every visit" you should set it to something else. The problem may still be there though.

Partial rendering issue with AJAX

I have following code working fine with ATLAS with partial rendering in IE and Firefox. But after I move the app to AJAX beta 1.0, it causes the the whole page rendering with Firefox 2.0 but it works fine with IE 6.x.

function setID(myID)
{
opid = document.getElementById ('<%=txtMyID.ClientID%>');
opid.value=myID;
document.getElementById('<%=ibtnMyButton.ClientID%>').click();
}

The page looks like:

<asp:UpdatePanel ID="UpdatePanel1" RenderMode="Inline" UpdateMode="Conditional" runat="Server">
<ContentTemplate>

<asp:UpdatePanel ID="UpdatePanel2" RenderMode="Inline" UpdateMode="Conditional" runat="Server">
<ContentTemplate>

<asp:TextBox ID="txtMyID" runat="server" ></asp:TextBox>

<asp:ImageButton ID="ibtnMyButton" runat="server" ImageUrl="../Images/go.gif"></asp:ImageButton>
........

</ContentTemplate>
</asp:UpdatePanel>

</ContentTemplate>
</asp:UpdatePanel>

How to solve this issue?

Try to change your codes as the following.
<asp:UpdatePanel ID="UpdatePanel1" RenderMode="Inline"ChildrenAsTriggers="false" UpdateMode="Conditional" runat="Server">
<ContentTemplate>
<asp:UpdatePanel ID="UpdatePanel2" RenderMode="Inline"ChildrenAsTriggers="false" UpdateMode="Conditional" runat="Server">
<ContentTemplate>
<asp:TextBox ID="txtMyID" runat="server" ></asp:TextBox>
<asp:ImageButton ID="ibtnMyButton" runat="server" ImageUrl="../Images/go.gif"></asp:ImageButton>
........
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</asp:UpdatePanel>
Wish the above can help you.
Thank you, Jasson, It works.