<%
Dim strFormName
Dim strTextAreaName
'Edit the intilised variables below to put in the name of your textrea's ID and the name
'of the form the textarea is within
'Name of the HTML form the textarea is within
strFormName = request.QueryString("strFormName")
'ID tag name of HTML textarea being replaced
strTextAreaName = request.QueryString("strTextAreaID")
%>
<html>
<head>
<script language="javascript">
function giveTheTextAreaAValue(){
// Populate the textarea with the value from the opener textarea
document.forms.<%= strFormName %>.textarea.value = window.opener.document.forms.<%= strFormName %>.<%= strTextAreaName %>.value
}
function updateTextAreaAndCloseMe(){
// first of all update the text area in the window opener
window.opener.document.forms.<%= strFormName %>.<%= strTextAreaName %>.value = document.getElementById('WebWizRTE').contentWindow.document.body.innerHTML
// Now that we have updated the opener with the formatted HTML code we can now close this window.
window.close()
}
</script>
<!--#include file="RTE_configuration/browser_page_encoding_inc.asp" -->
</head>
<body OnLoad="giveTheTextAreaAValue();initialiseWebWizRTE();">
<form name="<%= strFormName %>">
<!-- include the Web Wiz Rich Text Editor -->
<!--#include file="RTE_editor_inc.asp" -->
<textarea name="textarea" cols="80" rows="15" id="<%= strTextAreaName %>"></textarea>
<input type="button" name="Submit" value="Update" onClick="updateTextAreaAndCloseMe()">
<input name="reset" type="reset" value="Reset Form">
</form>
</body>
</html>