--- /dev/null
+<%@ CodePage=65001 Language="VBScript"%>\r
+<% Option Explicit %>\r
+<!--\r
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
+ * Copyright (C) 2003-2008 Frederico Caldeira Knabben\r
+ *\r
+ * == BEGIN LICENSE ==\r
+ *\r
+ * Licensed under the terms of any of the following licenses at your\r
+ * choice:\r
+ *\r
+ * - GNU General Public License Version 2 or later (the "GPL")\r
+ * http://www.gnu.org/licenses/gpl.html\r
+ *\r
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
+ * http://www.gnu.org/licenses/lgpl.html\r
+ *\r
+ * - Mozilla Public License Version 1.1 or later (the "MPL")\r
+ * http://www.mozilla.org/MPL/MPL-1.1.html\r
+ *\r
+ * == END LICENSE ==\r
+ *\r
+ * Sample page.\r
+-->\r
+<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>\r
+<!-- #INCLUDE file="../../fckeditor.asp" -->\r
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\r
+<html>\r
+ <head>\r
+ <title>FCKeditor - Sample</title>\r
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
+ <meta name="robots" content="noindex, nofollow">\r
+ <link href="../sample.css" rel="stylesheet" type="text/css" />\r
+ <script type="text/javascript">\r
+\r
+function FCKeditor_OnComplete( editorInstance )\r
+{\r
+ var oCombo = document.getElementById( 'cmbLanguages' ) ;\r
+ for ( code in editorInstance.Language.AvailableLanguages )\r
+ {\r
+ AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;\r
+ }\r
+ oCombo.value = editorInstance.Language.ActiveLanguage.Code ;\r
+}\r
+\r
+function AddComboOption(combo, optionText, optionValue)\r
+{\r
+ var oOption = document.createElement("OPTION") ;\r
+\r
+ combo.options.add(oOption) ;\r
+\r
+ oOption.innerHTML = optionText ;\r
+ oOption.value = optionValue ;\r
+\r
+ return oOption ;\r
+}\r
+\r
+function ChangeLanguage( languageCode )\r
+{\r
+ window.location.href = window.location.pathname + "?Lang=" + languageCode ;\r
+}\r
+ </script>\r
+ </head>\r
+ <body>\r
+ <h1>FCKeditor - ASP - Sample 2</h1>\r
+ This sample shows the editor in all its available languages.\r
+ <hr>\r
+ <table cellpadding="0" cellspacing="0" border="0">\r
+ <tr>\r
+ <td>\r
+ Select a language: \r
+ </td>\r
+ <td>\r
+ <select id="cmbLanguages" onchange="ChangeLanguage(this.value);">\r
+ </select>\r
+ </td>\r
+ </tr>\r
+ </table>\r
+ <br>\r
+ <form action="sampleposteddata.asp" method="post" target="_blank">\r
+<%\r
+' Automatically calculates the editor base path based on the _samples directory.\r
+' This is usefull only for these samples. A real application should use something like this:\r
+' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.\r
+Dim sBasePath\r
+sBasePath = Request.ServerVariables("PATH_INFO")\r
+sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )\r
+\r
+Dim oFCKeditor\r
+Set oFCKeditor = New FCKeditor\r
+oFCKeditor.BasePath = sBasePath\r
+\r
+If Request.QueryString("Lang") = "" Then\r
+ oFCKeditor.Config("AutoDetectLanguage") = True\r
+ oFCKeditor.Config("DefaultLanguage") = "en"\r
+Else\r
+ oFCKeditor.Config("AutoDetectLanguage") = False\r
+ oFCKeditor.Config("DefaultLanguage") = Request.QueryString("Lang")\r
+End If\r
+\r
+oFCKeditor.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."\r
+oFCKeditor.Create "FCKeditor1"\r
+%>\r
+ <br>\r
+ <input type="submit" value="Submit">\r
+ </form>\r
+ </body>\r
+</html>\r