Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to resolve "Tridion is undefined" error in a Tridion popup page?
    primarykey
    data
    text
    <p>I am customizing the ribbon toolbar and adding a button to it. Whenever I click on that button, it will open a aspx page allows authors to select some data, which gets appended to the existing RTF field content.</p> <p>But when popup is opened it is having the below error in the browser (Internet Explorer).</p> <pre><code>Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3) Timestamp: Thu, 5 Apr 2012 12:18:35 UTC Message: 'Tridion' is undefined Line: 1 Char: 1 Code: 0 URI: http://172.21.188.26:2694/WebUI/Core/stringresources.js </code></pre> <p>I can't find stringresources.js file in the specified location. Please suggest me a way to solve the problem.</p> <p>ButtonReference.js file: Type.registerNamespace("RTFExtensions.Commands"); </p> <pre><code>RTFExtensions.Commands.ButtonReference = function Commands$ButtonReference(name) { Type.enableInterface(this, "RTFExtensions.Commands.ButtonReference"); this.addInterface("Tridion.Cme.Command", [name || "ButtonReference"]); this.addInterface("Tridion.Cme.FaCommand", [name || "ButtonReference"]); }; RTFExtensions.Commands.ButtonReference.prototype._isAvailable = function ButtonReference$_isAvailable(target) { if (target.editor.getDisposed()) { return false; } return true; }; RTFExtensions.Commands.ButtonReference.prototype._isEnabled = function ButtonReference$_isEnabled(target) { if (!Tridion.OO.implementsInterface(target.editor, "Tridion.FormatArea") || target.editor.getDisposed()) { return false; } return true; }; RTFExtensions.Commands.ButtonReference.prototype._execute = function ButtonReference$_execute(target) { if (target.item.isActivePopupOpened()) { return; } function ButtonReference$execute$onPopupCanceled(event) { target.item.closeActivePopup(); }; //var url = $config.expandEditorPath("/Popups/PopupReference.aspx", "RTFExtensions"); var schemaId = $display.getView().getItem().getSchemaId(); var componentName = $display.getView().getItem().getTitle(); //alert($display.getView().getItem().getId()); alert($display.getView().getItem().getTitle()); var url = "Editors/RTFExtensions/Popups/PopupReference.aspx?schemaId=" + schemaId + "&amp;componentName=" + componentName; //var url = "Editors/RTFExtensions/Popups/PopupReference.aspx"; alert("url is " + url); var dialogFeatures = $cme.Popups.ITEM_SELECT.FEATURES; var popup = $popup.create(url, dialogFeatures, null); $evt.addEventHandler(popup, "submit", function ButtonReference$execute$onPopupSubmitted(event) { // Update FA var value = event.data.value; if (value) { alert("In Button Reference value:" + value); target.editor.applyHTML(value); } // Release target.item.closeActivePopup(); } ); $evt.addEventHandler(popup, "unload", ButtonReference$execute$onPopupCanceled); target.item.setActivePopup(popup); popup.open(); }; </code></pre> <p>PopupReference.js File:</p> <pre><code>Type.registerNamespace("RTFExtensions.Popups"); RTFExtensions.Popups.PopupReference = function (element) { Type.enableInterface(this, "RTFExtensions.Popups.PopupReference"); this.addInterface("Tridion.Cme.View"); }; RTFExtensions.Popups.PopupReference.prototype.initialize = function () { alert("initialized"); $log.message("Initializing Button Reference popup..."); this.callBase("Tridion.Cme.View", "initialize"); var p = this.properties; var c = p.controls; p.HtmlValue = { value: null }; c.SubmitButon = $("#Submit"); //asp dropdown //c.DropDown = $("#lookupvaluesDropdown"); //alert($("#lookupvaluesDropdown").value + "in initialize"); $evt.addEventHandler(c.SubmitButon, "click", this.getDelegate(this._execute)); // $evt.addEventHandler(c.InsertButton, "OnSelectedIndexChanged", this.getDelegate(this._execute)); }; RTFExtensions.Popups.PopupReference.prototype._execute = function () { alert("executing"); //alert($("#lookupvaluesDropdown").value); this.properties.HtmlValue.value = $("#lookupvaluesDropdown").value; alert(this.properties.HtmlValue.value + " in execute"); this.fireEvent("submit", this.properties.HtmlValue); alert("after fire event"); //$("#Submit").fireEvent("submit1", this.properties.HtmlValue); window.close(); }; $display.registerView(RTFExtensions.Popups.PopupReference); </code></pre> <p>PopupReference.aspx page:</p> <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PopupReference.aspx.cs" Inherits="ButtonReference.Popups.PopupReference" %&gt; &lt;%@ Import Namespace="Tridion.Web.UI.Core" %&gt; &lt;%@ Import Namespace="Tridion.Web.UI" %&gt; &lt;%@ Import Namespace="System.Web" %&gt; &lt;%@ Register TagPrefix="ui" Namespace="Tridion.Web.UI.Editors.CME.Controls" Assembly="Tridion.Web.UI.Editors.CME" %&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:cc="http://www.sdltridion.com/web/ui/core/controls"&gt; &lt;head id="Head1" runat="server"&gt; &lt;title&gt;Reference Button Popup&lt;/title&gt; &lt;cc:tridionmanager runat="server" editor="PowerTools2011"&gt; &lt;dependencies runat="server"&gt; &lt;dependency runat="server"&gt;Powertools2011.Example&lt;/dependency&gt; &lt;dependency runat="server"&gt;Tridion.Web.UI.Editors.CME&lt;/dependency&gt; &lt;dependency runat="server"&gt;Tridion.Web.UI.Editors.CME.commands&lt;/dependency&gt; &lt;/dependencies&gt; &lt;/cc:tridionmanager&gt; &lt;/head&gt; &lt;body&gt; &lt;form id="form1" runat="server"&gt; &lt;div&gt; &lt;h1&gt; Reference Button Popup &lt;/h1&gt; &lt;table&gt; &lt;tr&gt;&lt;td&gt;&lt;asp:DropDownList ID="lookupvaluesDropdown" runat="server"&gt;&lt;/asp:DropDownList&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;asp:Button ID="Submit" runat="server" Text="Submit" /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload