~ubuntu-branches/ubuntu/trusty/fusionforge/trusty

« back to all changes in this revision

Viewing changes to plugins/fckeditor/www/_samples/asp/sample03.asp

  • Committer: Bazaar Package Importer
  • Author(s): Roland Mas
  • Date: 2011-04-15 14:55:34 UTC
  • mfrom: (4.1.10 sid)
  • Revision ID: james.westby@ubuntu.com-20110415145534-mvn1nochufjmw177
Tags: 5.0.3-1
New upstream bugfix release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<%@ CodePage=65001 Language="VBScript"%>
 
2
<% Option Explicit %>
 
3
<!--
 
4
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 
5
 * Copyright (C) 2003-2008 Frederico Caldeira Knabben
 
6
 *
 
7
 * == BEGIN LICENSE ==
 
8
 *
 
9
 * Licensed under the terms of any of the following licenses at your
 
10
 * choice:
 
11
 *
 
12
 *  - GNU General Public License Version 2 or later (the "GPL")
 
13
 *    http://www.gnu.org/licenses/gpl.html
 
14
 *
 
15
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 
16
 *    http://www.gnu.org/licenses/lgpl.html
 
17
 *
 
18
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 
19
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 
20
 *
 
21
 * == END LICENSE ==
 
22
 *
 
23
 * Sample page.
 
24
-->
 
25
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
 
26
<!-- #INCLUDE file="../../fckeditor.asp" -->
 
27
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 
28
<html>
 
29
        <head>
 
30
                <title>FCKeditor - Sample</title>
 
31
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
32
                <meta name="robots" content="noindex, nofollow">
 
33
                <link href="../sample.css" rel="stylesheet" type="text/css" />
 
34
                <script type="text/javascript">
 
35
 
 
36
function FCKeditor_OnComplete( editorInstance )
 
37
{
 
38
        var oCombo = document.getElementById( 'cmbToolbars' ) ;
 
39
        oCombo.value = editorInstance.ToolbarSet.Name ;
 
40
        oCombo.style.visibility = '' ;
 
41
}
 
42
 
 
43
function ChangeToolbar( toolbarName )
 
44
{
 
45
        window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
 
46
}
 
47
 
 
48
                </script>
 
49
        </head>
 
50
        <body>
 
51
                <h1>FCKeditor - ASP - Sample 3</h1>
 
52
                This sample shows how to change the editor toolbar.
 
53
                <hr>
 
54
                <table cellpadding="0" cellspacing="0" border="0">
 
55
                        <tr>
 
56
                                <td>
 
57
                                        Select the toolbar to load:&nbsp;
 
58
                                </td>
 
59
                                <td>
 
60
                                        <select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
 
61
                                                <option value="Default" selected>Default</option>
 
62
                                                <option value="Basic">Basic</option>
 
63
                                        </select>
 
64
                                </td>
 
65
                        </tr>
 
66
                </table>
 
67
                <br>
 
68
                <form action="sampleposteddata.asp" method="post" target="_blank">
 
69
<%
 
70
' Automatically calculates the editor base path based on the _samples directory.
 
71
' This is usefull only for these samples. A real application should use something like this:
 
72
' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
 
73
Dim sBasePath
 
74
sBasePath = Request.ServerVariables("PATH_INFO")
 
75
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
 
76
 
 
77
Dim oFCKeditor
 
78
Set oFCKeditor = New FCKeditor
 
79
oFCKeditor.BasePath = sBasePath
 
80
 
 
81
If Request.QueryString("Toolbar") <> "" Then
 
82
        oFCKeditor.ToolbarSet = Server.HTMLEncode( Request.QueryString("Toolbar") )
 
83
End If
 
84
 
 
85
oFCKeditor.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
 
86
oFCKeditor.Create "FCKeditor1"
 
87
%>
 
88
                        <br>
 
89
                        <input type="submit" value="Submit">
 
90
                </form>
 
91
        </body>
 
92
</html>