| Author |
Topic Search Topic Options
|
kimboy
Newbie
Joined: 15 July 2011
Status: Offline
Points: 2
|
Post Options
Thanks(0)
Quote Reply
Topic: Including WW RTE from inside script Posted: 15 July 2011 at 10:16am |
Thanks very much indeed, that was very useful. This command puts the menu in the right position, without error messages.
The effect is limited: Some buttons open dialog boxes, but
drop-down lists do not drop down, and I cannot achieve any formatting
effects in the textarea box. Furthermore, the format of the tools is a
bit off: buttons are taller that the toolbar on which they reside;
hence four rows of buttons need five bars. If there are obvious reasons
for this I would be glad to learn about them; if not, I will engage in
some more debugging before returning to the group for some more advice.
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Poole, England
Status: Offline
Points: 7797
|
Post Options
Thanks(0)
Quote Reply
Posted: 20 October 2009 at 3:54pm |
|
All I can say is to try rewriting your code not to use the sub and use some other method instead.
|
|
|
 |
hakonf
Newbie
Joined: 18 October 2009
Status: Offline
Points: 6
|
Post Options
Thanks(0)
Quote Reply
Posted: 20 October 2009 at 3:42pm |
Shorthands appreciated; I may be confusing the issue. The position where I want to #include is in the middle of a Subroutine which is defined in a file, let us call the file i.asp. Th file i.asp has a structure like this:
<script runat=Server>
Sub xxx
...
</script>
<-- #include file=... -->
<script>
...
End Sub
Sub xyz
...
End Sub
</script>
If I insert the two tags in red, I cannot create the necessary connection between the upper and lower parts of the code, except perhaps by splitting the Sub in two and arranging for some sort of transfer of parameters between them.
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Poole, England
Status: Offline
Points: 7797
|
Post Options
Thanks(0)
Quote Reply
Posted: 20 October 2009 at 10:42am |
|
Replace <script> and </script> with <% and %> or vise versa as they both mean the same thing. <% and %> is shorthand for <script> and </script>
|
|
|
 |
hakonf
Newbie
Joined: 18 October 2009
Status: Offline
Points: 6
|
Post Options
Thanks(0)
Quote Reply
Posted: 19 October 2009 at 5:21pm |
Yes; it works to put it between these tags:
<% ... %> <!--#include ... > <% ... %>
but in my case, my subroutines are in a file that begins/ends with <script> ... </script> tags, and in this case I can't make it work with:
<script> ... </script> <!--#include ...> <script> ... </script>
nor with:
<script> ... %> <!--#include ...> <% ... </script>
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Poole, England
Status: Offline
Points: 7797
|
Post Options
Thanks(0)
Quote Reply
Posted: 19 October 2009 at 5:10pm |
|
Includes can be used inside script blocks as I have shown in the previous post, but instead of using the usual include code place it between and closing and opening script bloc:-
<form action="t.asp" method="post" name="myForm" id="myForm"> <%
strFormName = "myForm" strTextAreaName = "myTextarea" %><!--#include file="RTE_editor_inc.asp" --><% 'This allows you to use ASP to decide if an include is used or not within a page %> <textarea cols="90" rows="33" name="myTextarea" id="myTextarea">
|
|
|
 |
hakonf
Newbie
Joined: 18 October 2009
Status: Offline
Points: 6
|
Post Options
Thanks(0)
Quote Reply
Posted: 19 October 2009 at 4:35pm |
<html> <head></head> <body onLoad="initialiseWebWizRTE();"> <form action="t.asp" method="post" name="myForm" id="myForm"> <%
strFormName = "myForm" strTextAreaName = "myTextarea" Server.Execute("RTE_editor_inc.asp")
' This works to load the toolbars but not to activate the formatting tools
' It works OK with #include but #include cannot be inside a <script></script> block %> <textarea cols="90" rows="33" name="myTextarea" id="myTextarea"> Pre-filled textarea contents goes here </textarea><br> <input type="submit" name="Submit" id="Submit" value="Submit Form" /> <input type="reset" name="reset" id="reset" value="Reset Form" /> </form> </body> </html>
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Poole, England
Status: Offline
Points: 7797
|
Post Options
Thanks(0)
Quote Reply
Posted: 19 October 2009 at 1:11pm |
You can use include files with a script block eg:-
<% If myVar = "xxx" Then %><!--#include file="RTE_editor_inc.asp" --><% End If %> |
Although technically the include file is still outside of the script block the ASP code still decides if the include file is included or not.
|
|
|
 |