?
Solved

Free RTE ( http://freerichtexteditor.com/ ) . Problem preloading content.

Posted on 2008-10-29
1
Medium Priority
?
1,791 Views
Last Modified: 2012-06-27
Hello Experts,

I am new to ASP and relatively new to JS, so I apologize for this silly question.

I have a problem preloading content to  Free Rich Text Editor( http://freerichtexteditor.com/ ).
I included all the requires files to my ASP page:

<script LANGUAGE="javascript" type="text/javascript" src="/Includes/JS/config.js"></script>
<script LANGUAGE="javascript" type="text/javascript" SRC="/Includes/JS/richtext.js"></script>

and initialized RTE in my <table></table> successfully:

<SCRIPT LANGUAGE=javascript>
initRTE(' ', ' ');
</SCRIPT>

Now I need to preload some content there. I have a variable on my page which is basically a value from the DB, which is generated dynamically and I can' hardcode it. The value of this variable is supposed to preload in the textarea of RTE.

I tried to initialize RTE like this, first parameter is supposed to be preloaded content.

<SCRIPT LANGUAGE=javascript>
initRTE('<%=myVariable%> ', ' ');
</SCRIPT>

But it didn't work.

At the same tme  initRTE('some text ', ' '); works just fine.

I came across the following example for ASP:

http://mrcmain.net/Smitha/RTE/examples/example.asp

Can someone help me to make it work with VB6?

Thanks in advance.

0
Comment
Question by:snarinsky
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
bluV11t earned 2000 total points
ID: 22838974
Hi!
I think you just have to do some small syntax changes to freeRTE_Preload function to make it VB.
<%
function freeRTE_Preload(content)
	' Strip whitespace.
	content = trim(content);
	' Strip newline characters.
	content = replace(content, chr(10), " ")
	content = replace(content, chr(13), " ")
	' Replace single quotes.
	content = replace(content, chr(145), chr(39))
	content = replace(content, chr(146), chr(39))
	' Return the result.
	freeRTE_Preload = content
End function
' Send the preloaded content to the function.
myVariable = freeRTE_Preload("<i>This is some <b>preloaded</b> content</i>")
 
%>

Open in new window

0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses
Course of the Month12 days, 1 hour left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question