PostArticles.aspx Bug In Firefox

Posted by RtpHarry under DotNetFunda.Com on 1/29/2010 | Views : 2017 | Status : [Member] [MVP] | Replies : 2
If you try to click the logout button in Firefox a javascript error is thrown which prevents the javascript postback call from completing.

This only happens on the PostArticle.aspx page.

The error is: 
Error: document.all is undefined
Source File: http://www.dotnetfunda.com/post/?ReturnUrl=/post/postarticle.aspx
Line: 207


The code it has a problem with is:

    function ValidateCheckBox(source, args)
{
if(document.all["ctl00_PlaceHolderContent_chkAgreed"].checked == false)
{
alert("You must agree (check the checkbox) to proceed.");
args.IsValid = false;
}
}


Which looks like a custom validator but I don't know which checkbox it is trying to validate.
Document.all is an IE only dom technique.

http://www.google.co.uk/search?q=document.all+firefox




Responses

Posted by: Webmaster on: 1/29/2010 [Administrator] HonoraryPlatinum

Up
0
Down
Dear RtpHarry,

The problem function you have written is in the post is on http://www.dotnetfunda.com/post/?ReturnUrl=/post/postarticle.aspx page and we noticed that it had document.all however it was working on our FireFox 3.5.7.

To make it standard, we have changed to document.getElementById.

However the Logout problem still exists as it is due to the Rich Text Editor in PostArticle.aspx page. This is a known issue till this problem is resolved by the developer of Rich Text Editor. Sorry for this, we shall try if we can get it resolved.

Best regard,
Webmaster

Best regards,
Webmaster
http://www.dotnetfunda.com

RtpHarry, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: RtpHarry on: 1/30/2010 [Member] [MVP] Bronze

Up
0
Down
Oh yeah you are correct I must have been confused :)

I just double clicked on the error and it showed me she source code. Didn't realise it had actually occured on the previous page!

RtpHarry, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response