Dear Friends (and saviors)
I am not a programmer but using dreamweaver MX I am able to create some small application. I have written a blog application and in the cms portion of it, I have use just a regular text box to enter my message. Now, I have found a RT editor which I would like to implement into my application. Here is the situation. I have a page, named editor.asp in which I have all my blog entry field. One of them being "Message". I have also a link on that page, that opens a child window with the RT editor. Now, I want to be able to enter the content there and on submission have the html put into my "Message" textbox which I than write along with other fields into my database.
Here is are the codes
Parent page
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Total Quality Assurance</title>
<link href="/MainStyles.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript"><!--
function CreateWindow1() {
ChildWindow=window.open("rte/demo.asp","RTE","toolbar=no,width=600,height=500,directories=no,status=no,scrollbars=auto,resizable=no,border=0,menubar=no")
} // -->
</SCRIPT>
</head>
<body>
<table width="740" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse">
<tr>
<td bgcolor="#3B465A"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#FF6600">
<td colspan="2"><img src="/images/1X1.gif" width="1" height="2"></td>
</tr>
<tr bgcolor="#000000">
<td colspan="2"><img src="/images/1X1.gif" width="1" height="1"></td>
</tr>
<tr>
<td valign="top" bgcolor="#626B78"><img src="/images/logo.gif" width="300" height="100"></td>
<td rowspan="2" valign="top"><img src="/images/TopRight.gif" width="439" height="200"></td>
</tr>
<tr>
<td valign="top" bgcolor="#626B78"><!--#include virtual="mSection.htm"--></td>
</tr>
<tr>
<td width="300" valign="top" bgcolor="#3B465A"><!--#include virtual="bSection.htm"--></td>
<td width="63%" valign="top" bgcolor="#FF6600"><table width="100%" border="0" cellspacing="6" cellpadding="6">
<tr>
<td><form action="editor.asp" method="get" name="MessageForm" id="MessageForm">
<textarea name="Message" cols="35" rows="5" id="Message"></textarea>
<a href="javascript:ChildWindow=CreateWindow1()">demo</a></p>
</form></td>
</tr>
</table></td>
</tr>
<tr bgcolor="#596271">
<td colspan="2"><!--#include virtual="fSection.htm"--></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
and here is the Child Page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>Cross-Browser Rich Text Editor</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="JavaScript" type="text/javascript" src="lang/en.js"></script>
<script language="JavaScript" type="text/javascript" src="richtext_compressed.js"></script>
<script language="JavaScript" type="text/javascript" src="html2xhtml_compressed.js"></script>
</head><body>
<form name="RTEDemo" action="../editor.asp" method="post" onsubmit="return submitForm();">
<script language="JavaScript" type="text/javascript">
<!--
function submitForm() {
updateRTE('rte1');
//updateRTEs();
document.outputform.outputfield.value = document.RTEDemo.rte1.value
document.outputform.submit()
//window.close();
}
//Usage: initRTE(imagesPath, includesPath, cssFile, genXHTML)
initRTE("images/", "", "", true);
//-->
</script>
<script language="JavaScript" type="text/javascript">
<!--
//Usage: writeRichText(fieldname, html, css_override, width, height, buttons, readOnly, fullscreen)
writeRichText('rte1','<b>Your Entry Here</b>', '', 580, 300, true, false, false);
//-->
</script>
<p><input type="submit" name="submit" value="Submit"></p>
</form>
<form action="../editor.asp" method="Post" name="outputform" id="outputform">
<input name="outputfield" type="text" id="outputfield" value="" size="65">
</form>
</body></html>
I have made an extra form&filed (outputform&outputfield) whcih I would like to have submited into the "message" field in the parent page.
any help would be highly appreciated
I am not a programmer but using dreamweaver MX I am able to create some small application. I have written a blog application and in the cms portion of it, I have use just a regular text box to enter my message. Now, I have found a RT editor which I would like to implement into my application. Here is the situation. I have a page, named editor.asp in which I have all my blog entry field. One of them being "Message". I have also a link on that page, that opens a child window with the RT editor. Now, I want to be able to enter the content there and on submission have the html put into my "Message" textbox which I than write along with other fields into my database.
Here is are the codes
Parent page
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Total Quality Assurance</title>
<link href="/MainStyles.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript"><!--
function CreateWindow1() {
ChildWindow=window.open("rte/demo.asp","RTE","toolbar=no,width=600,height=500,directories=no,status=no,scrollbars=auto,resizable=no,border=0,menubar=no")
} // -->
</SCRIPT>
</head>
<body>
<table width="740" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse">
<tr>
<td bgcolor="#3B465A"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#FF6600">
<td colspan="2"><img src="/images/1X1.gif" width="1" height="2"></td>
</tr>
<tr bgcolor="#000000">
<td colspan="2"><img src="/images/1X1.gif" width="1" height="1"></td>
</tr>
<tr>
<td valign="top" bgcolor="#626B78"><img src="/images/logo.gif" width="300" height="100"></td>
<td rowspan="2" valign="top"><img src="/images/TopRight.gif" width="439" height="200"></td>
</tr>
<tr>
<td valign="top" bgcolor="#626B78"><!--#include virtual="mSection.htm"--></td>
</tr>
<tr>
<td width="300" valign="top" bgcolor="#3B465A"><!--#include virtual="bSection.htm"--></td>
<td width="63%" valign="top" bgcolor="#FF6600"><table width="100%" border="0" cellspacing="6" cellpadding="6">
<tr>
<td><form action="editor.asp" method="get" name="MessageForm" id="MessageForm">
<textarea name="Message" cols="35" rows="5" id="Message"></textarea>
<a href="javascript:ChildWindow=CreateWindow1()">demo</a></p>
</form></td>
</tr>
</table></td>
</tr>
<tr bgcolor="#596271">
<td colspan="2"><!--#include virtual="fSection.htm"--></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
and here is the Child Page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>Cross-Browser Rich Text Editor</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="JavaScript" type="text/javascript" src="lang/en.js"></script>
<script language="JavaScript" type="text/javascript" src="richtext_compressed.js"></script>
<script language="JavaScript" type="text/javascript" src="html2xhtml_compressed.js"></script>
</head><body>
<form name="RTEDemo" action="../editor.asp" method="post" onsubmit="return submitForm();">
<script language="JavaScript" type="text/javascript">
<!--
function submitForm() {
updateRTE('rte1');
//updateRTEs();
document.outputform.outputfield.value = document.RTEDemo.rte1.value
document.outputform.submit()
//window.close();
}
//Usage: initRTE(imagesPath, includesPath, cssFile, genXHTML)
initRTE("images/", "", "", true);
//-->
</script>
<script language="JavaScript" type="text/javascript">
<!--
//Usage: writeRichText(fieldname, html, css_override, width, height, buttons, readOnly, fullscreen)
writeRichText('rte1','<b>Your Entry Here</b>', '', 580, 300, true, false, false);
//-->
</script>
<p><input type="submit" name="submit" value="Submit"></p>
</form>
<form action="../editor.asp" method="Post" name="outputform" id="outputform">
<input name="outputfield" type="text" id="outputfield" value="" size="65">
</form>
</body></html>
I have made an extra form&filed (outputform&outputfield) whcih I would like to have submited into the "message" field in the parent page.
any help would be highly appreciated