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

[Solved] havascript error on pageTop menu

5 Answers 121 Views
Editor
This is a migrated thread and some comments may be shown as answers.
test
Top achievements
Rank 1
test asked on 10 Jan 2008, 10:42 AM
I have 3 editors on a single page using pageTop toolbarmode. When clicking in any of the editors i get a javascript error as shown below:

if(this._popupElement){

this._popupElement.style.width=this._width;

this._updatePopupZindex();

}


The error occurs due to     'this._width' having a value of    '-10px'
If i change this value in debug at runtime to a positive value it works.

Any help would be greatly appreciated

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 10 Jan 2008, 12:20 PM
Hi,

I tried to reproduce the reported problem by testing the Toolbar mode example of RadEditor "Prometheus". Are you able to reproduce the problem with this example by setting the value of the "Choose toolbar mode" dropdown to PageTop?

If your are not able to locate the reason for the problem in your project, then please open a support ticket (you should be a customer or have downloaded some control) and send a sample working project that demonstrates the Page Top toolbar problem along with steps to replicate the issue.

Once we are able to reproduce the problem we will do our best to help.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
test
Top achievements
Rank 1
answered on 10 Jan 2008, 02:02 PM
I haven't managed to reproduce the problem on that test site. I have reproduced it in a project, which the toolbar was working in, by importing a javascript class into the user control using the following

<

script language="javascript" src="jscript/Main.js" type="text/javascript"></script>

I now get the error. The javascipt has nothing unusual in it but is used throughout the project so am unable to remove it.

0
Tervel
Telerik team
answered on 10 Jan 2008, 02:10 PM
Hello test,

Is it possible that in this jscript/Main.js you have global variables with names such as var top, var width, var height?

It is possible that such global variables in IE can confuse the browser (not in FireFox, however).

If you are unable to find and rename those, please send us jscript/Main.js to examine it on our end.

Kind regards,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
test
Top achievements
Rank 1
answered on 10 Jan 2008, 04:50 PM
I have managaed to fix the problem with the javascript error in the test project and that now works.

In my main project i am still getting an error when using IE but as from your suggestion i have tried it in firefox and it works perfectly. Are there any more known differences between the 2 browsers as to why it wouldnt be working in IE.
0
Tervel
Telerik team
answered on 11 Jan 2008, 12:48 PM
Hello,

In IE a poroblem would arise each time a global variable is called the same way as some existing, well-known property of the window object.

For example - window.top refers to the top browser window. Naming a variable top causes IE to get confused about this.

This is valid for each case - please check the properties of the browser window object in MSDN or other web-based resources.


All the best,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
test
Top achievements
Rank 1
Answers by
Rumen
Telerik team
test
Top achievements
Rank 1
Tervel
Telerik team
Share this question
or