source: companies/celepar/news_admin/templates/celepar/fckeditor/to_delete/_samples/asp/sample02.asp @ 763

Revision 763, 3.2 KB checked in by niltonneto, 15 years ago (diff)

Importação inicial do Expresso da Celepar

Line 
1<%@ CodePage=65001 Language="VBScript"%>
2<% Option Explicit %>
3<!--
4 * FCKeditor - The text editor for internet
5 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
6 *
7 * Licensed under the terms of the GNU Lesser General Public License:
8 *              http://www.opensource.org/licenses/lgpl-license.php
9 *
10 * For further information visit:
11 *              http://www.fckeditor.net/
12 *
13 * "Support Open Source software. What about a donation today?"
14 *
15 * File Name: sample02.asp
16 *      Sample page.
17 *
18 * File Authors:
19 *              Frederico Caldeira Knabben (fredck@fckeditor.net)
20-->
21<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
22<!-- #INCLUDE file="../../fckeditor.asp" -->
23<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
24<html>
25        <head>
26                <title>FCKeditor - Sample</title>
27                <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
28                <meta name="robots" content="noindex, nofollow">
29                <link href="../sample.css" rel="stylesheet" type="text/css" />
30                <script type="text/javascript">
31
32function FCKeditor_OnComplete( editorInstance )
33{
34        var oCombo = document.getElementById( 'cmbLanguages' ) ;
35        for ( code in editorInstance.Language.AvailableLanguages )
36        {
37                AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
38        }
39        oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
40}       
41
42function AddComboOption(combo, optionText, optionValue)
43{
44        var oOption = document.createElement("OPTION") ;
45
46        combo.options.add(oOption) ;
47
48        oOption.innerHTML = optionText ;
49        oOption.value     = optionValue ;
50       
51        return oOption ;
52}
53
54function ChangeLanguage( languageCode )
55{
56        window.location.href = window.location.pathname + "?Lang=" + languageCode ;
57}
58                </script>
59        </head>
60        <body>
61                <h1>FCKeditor - ASP - Sample 2</h1>
62                This sample shows the editor in all its available languages.
63                <hr>
64                <table cellpadding="0" cellspacing="0" border="0">
65                        <tr>
66                                <td>
67                                        Select a language:&nbsp;
68                                </td>
69                                <td>
70                                        <select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
71                                        </select>
72                                </td>
73                        </tr>
74                </table>
75                <br>
76                <form action="sampleposteddata.asp" method="post" target="_blank">
77<%
78' Automatically calculates the editor base path based on the _samples directory.
79' This is usefull only for these samples. A real application should use something like this:
80' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
81Dim sBasePath
82sBasePath = Request.ServerVariables("PATH_INFO")
83sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
84
85Dim oFCKeditor
86Set oFCKeditor = New FCKeditor
87oFCKeditor.BasePath = sBasePath
88
89If Request.QueryString("Lang") = "" Then
90        oFCKeditor.Config("AutoDetectLanguage") = True
91        oFCKeditor.Config("DefaultLanguage")    = "en"
92Else
93        oFCKeditor.Config("AutoDetectLanguage") = False
94        oFCKeditor.Config("DefaultLanguage")    = Request.QueryString("Lang")
95End If
96
97oFCKeditor.Value = "This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
98oFCKeditor.Create "FCKeditor1"
99%>
100                        <br>
101                        <input type="submit" value="Submit">
102                </form>
103        </body>
104</html>
Note: See TracBrowser for help on using the repository browser.