Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to link the popup JavaScript and popup aspx page while implementing Ribbon toolbar button in Tridion?

I am implementing a ribbon tool bar button for component view.

When I click in the RTF field the button will be enabled. When I click on the button it will open a aspx page. When the aspx page is opened the corresponding JavaScript should initialize by default. But in my case it is not happening.
I have given common names to the JavaScript and aspx page. Please suggest how to debug this problem and get a solution.

like image 393
P.Muralikrishna Avatar asked Oct 22 '22 23:10

P.Muralikrishna


1 Answers

Are you saying that your JavaScript file doesn't get included at all?

Or that the "initialize" method isn't getting called?

If it's the former, you should look at your dependencies. Normally you would have a group in your Editor configuration file which includes the .js file and optionally a .css file as well. You would then include a dependency on this group in your .aspx.cs file, by including a ControlResources attribute (passing in the name of the group).

If the problem is that your "initialize" method isn't being called, you should check if you are registering the view (e.g. calling $display.registerView(FullNameOfYourClassIncludingNamespce) at the bottom of your JavaScript file)

like image 200
Peter Kjaer Avatar answered Nov 15 '22 06:11

Peter Kjaer