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

Firefox, radMenu and Webservice

1 Answer 65 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 16 Feb 2011, 12:29 PM
I have a RadMenu with all items, and multiple levels of sub-items, populated by a webmethod. IE8 is perfect, and the tree is working as it should, all items are correctly fetched and placed, etc. The same goes for Firefox - as long as you take your time and allow menus to expand fully, etc, though performance is noticeably slower than in IE8.

The problem I have is if I click on an item that has started to fetch its child items - I get an error saying that the "The server method 'xxx' failed". This only occurs in FF - IE handles cancellation of the Web method perfectly.

I tried the following to intercept and catch any error raised in the fetch like this :
I set  

OnClientItemPopulationFailed="javascript:supressErrors();"

in the RadMenu control, then included this script in the page

   <script language="javascript" type="text/javascript">
       function supressErrors(sender, eventArgs) {
           eventArgs.set_cancel(true);
       }</script>

But in both browsers, this prevents any webservice calls, and I don't even get the > (right arrow) on the root items.

Anyone come across this before? 

1 Answer, 1 is accepted

Sort by
0
Andrew
Top achievements
Rank 1
answered on 16 Feb 2011, 02:29 PM
OK - Problem solved - my mistake - because the contents of OnClientItemPopulationFailed is used in javascript used during the set up of the controls in the page, the text for that setting needs to be 'safe'.

OnClientItemPopulationFailed="suppressErrors"

Gets around the problem, and fixes the Firefox issue.

Tags
Menu
Asked by
Andrew
Top achievements
Rank 1
Answers by
Andrew
Top achievements
Rank 1
Share this question
or