Ask a Question related to ASP, Design and Development.
-
monika #1
editor features?
I want to use a simple editor which has the capability of changing color or
bold it... a very simple one in my application of asp/access. Can anyone
suggest any such editor whereby I can use it?
my purpose is to get story written by a student in the textbox/textarea of
that editor from the database. The teacher highlights using the editor
features....making letters bold or in red to highlight changes. and then
save it to the database.
later available for the student to view his changes.
any help would be appreciable.
thanks
monika Guest
-
Calendar features
Does anyone know any script I could use to set a calendar which uses 3 drop downs (one each for month, day and year) to calculate the end date to be... -
Features are missing.
I tried removing Acrobat 5.05 deleteing the dirs installing no go. The first two tabs are on the left, the dropdown has two options. Can no longer... -
Prepress Features
We have recently upgraded to CS. I very much like illustrator, it has been our main artworking program for many years. I have just been looking... -
Invoking another Editor (UrlEditor) from an Editor (CollectionEditor)
Hi, Any pointers how I can invoke the UrlEditor from a custom CollectionEditor? I have a collection property that represents a list of... -
editor features..has anyone worked on similar grounds?
janet wrote: CSS classnames will solve the display issue, but for the CMS I think you will get a better response in a group focused on client... -
Phill. W #2
Re: editor features?
"monika" <monikadang@hotmail.com> wrote in message
news:uBFRyw5dDHA.2524@TK2MSFTNGP09.phx.gbl...Have you tried the RichTextBox control ?> I want to use a simple editor which has the capability of changing color
> or bold it... a very simple one in my application of asp/access. Can
> anyone suggest any such editor whereby I can use it?
Loading/Saving the TextRTF property from/to the database should
do the trick...
HTH,
Phill W.
Phill. W Guest
-
Tom B #3
Re: editor features?
Try cutting and pasting the following....it'll get you started....
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<SCRIPT language=javascript id=clientEventHandlersJS>
<!--
var cursorPos;
function saveCursorPos(){
cursorPos=document.selection.createRange().duplica te();
//alert('cursorPos='+ cursorPos.value );
}
function cmdBullet_onclick()
{
divDisplay.document.execCommand('insertunorderedli st','','');
divDisplay.focus();
return false;
}
function cmdSave_onclick() {
//hiddenInput.value=divDisplay.innerHTML;
theForm.hiddenInput.value=divDisplay.innerHTML;
//theForm.hiddenProcInput.value=divProc.innerHTML;
if (theForm.hiddenInput.value.length >102399)
{
alert('Document is too big:' + theForm.hiddenInput.value.length);
return false;
}
if (theForm.Category.selectedIndex==0)
{
alert('Please select/create a Category');
return false;
}
if (theForm.Code.value.length==0)
{
alert('Please enter a Policy Number');
return false;
}
if (theForm.Title.value.length==0)
{
alert('Please enter a Policy Title');
return false;
}
if (theForm.hiddenInput.value.length==0)
{
alert('Please enter the Policy Content.');
return false;
}
theForm.submit();
}
function cmdNumbered_onclick() {
divDisplay.document.execCommand('insertorderedlist ','','');
divDisplay.focus();
return false;
}
function cmdBold_onclick() {
divDisplay.document.execCommand('bold','','');
divDisplay.focus();
return false;
}
function cmdItalic_onclick() {
divDisplay.document.execCommand('italic','','');
divDisplay.focus();
return false;
}
function cmdTab_onclick() {
divDisplay.document.execCommand('indent','','');
divDisplay.focus();
return false;
}
function cmdUnTab_onclick() {
divDisplay.document.execCommand('outdent','','');
divDisplay.focus();
return false;
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<DIV id=Layer1
style="Z-INDEX: 3; LEFT: 631px; WIDTH: 96px; POSITION: absolute; TOP:
9px; HEIGHT: 42px">
<DIV align=right><A href="http://tbserver/CCAC_V_1_0/"><IMG
src="Editor_files/close_spacer.gif" border=0></A></DIV></DIV>
<DIV id=overDiv
style="Z-INDEX: 1; LEFT: 300px; POSITION: absolute; TOP: 200px"></DIV>
<SCRIPT language=JavaScript src="Editor_files/overlib.js"></SCRIPT>
<H2 align=center><IMG height=50
src="Editor_files/add_new_policy_header2.gif" width=600></H2>
<FORM name=theForm action=SaveNew.asp method=post>
<TABLE width=500>
<TBODY>
<TR>
<TD>
<FIELDSET><LEGEND><FONT size=2>Policy Content </FONT></LEGEND>
<TABLE>
<TBODY>
<TR>
<TH colSpan=3>
<DIV align=center>
<TABLE cellSpacing=0 cellPadding=0 align=center>
<TBODY>
<TR>
<TD id=Bold width=31><INPUT language=javascript
id=cmdBold onclick="return cmdBold_onclick()"
type=image
src="Editor_files/Bold.gif" value=Bold name=image>
</TD>
<TD id=Italic width=31><INPUT language=javascript
id=cmdItalic onclick="return cmdItalic_onclick()"
type=image src="Editor_files/Italic.gif"
value=Italic
name=image> </TD>
<TD id=Bullet width=31><INPUT language=javascript
id=cmdBullet onclick="return cmdBullet_onclick()"
type=image src="Editor_files/Bullet.gif"
value=Bullet
name=cmdBullet> </TD>
<TD id=Numbered width=31><INPUT language=javascript
id=cmdNumbered onclick="return
cmdNumbered_onclick()"
type=image src="Editor_files/Numbered.gif"
value=Numbered name=image> </TD>
<TD id=Tab width=31><INPUT language=javascript
id=cmdTab
onclick="return cmdTab_onclick()" type=image
src="Editor_files/tab.gif" value=Tab name=image>
</TD>
<TD id=UnTab width=31><INPUT language=javascript
id=cmdUnTab onclick="return cmdUnTab_onclick()"
type=image src="Editor_files/Untab.gif" value=UnTab
name=image> </TD>
<TD id=UnTab width=311>
<DIV align=right><IMG height=30
src="Editor_files/add_policy_content.gif"
width=200></DIV></TD></TR></TBODY></TABLE></DIV></TH></TR>
<TR>
<TD colSpan=3><INPUT style="WIDTH: 207px; HEIGHT: 22px"
type=hidden size=26 name=hiddenInput>
<TABLE onclick=divDisplay.focus(); borderColor=#9ea1d6
height=100 cellSpacing=0 cellPadding=0 width=502
align=center
bgColor=#e5e6f3 border=1>
<TBODY>
<TR border="0">
<TD vAlign=top width=500 border="0">
<DIV id=divDisplay onkeyup=saveCursorPos();
contentEditable=true
name="divDisplay"></DIV></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD align=right colSpan=3><INPUT onclick=cmdSave_onclick();
type=button
value="Next>>>"></TD></TR></TBODY></TABLE></FIELDSET>
</TD></TR></TBODY></TABLE></FORM>
</BODY></HTML>
"monika" <monikadang@hotmail.com> wrote in message
news:uBFRyw5dDHA.2524@TK2MSFTNGP09.phx.gbl...or> I want to use a simple editor which has the capability of changing color> bold it... a very simple one in my application of asp/access. Can anyone
> suggest any such editor whereby I can use it?
> my purpose is to get story written by a student in the textbox/textarea of
> that editor from the database. The teacher highlights using the editor
> features....making letters bold or in red to highlight changes. and then
> save it to the database.
>
> later available for the student to view his changes.
>
> any help would be appreciable.
> thanks
>
>
Tom B Guest
-
monika #4
Re: editor features?
hi tom ..thanks for the quick response. I realise that here divDisplay is
the object where i need to retrieve the value from the database. pls see the
change i did to make it useful for my application:
..
..
..
..
<%
DIM RSA
DIM QUERY
Set RSA = Server.CreateObject("ADODB.Recordset")
QUERY = "select story_name from story_table where story_id = 1"
rsa.open query, "dsn=school"
%>
<TR>
<TD colSpan=3><INPUT style="WIDTH: 207px; HEIGHT: 22px"
type=hidden size=26 name=hiddenInput>
<TABLE onclick=divDisplay.focus(); borderColor=#9ea1d6
height=100 cellSpacing=0 cellPadding=0 width=502
align=center bgColor=#e5e6f3 border=1
value=<%=rsa.fields("story_name")%>>
...remaining code...
but i dont the value being retrieved from the database? how can that be
achieved?
my purpose is to get the story from the database in the editable textbox or
whatever and then save the content to the database after changing it?
would be a great help if u respond.
thanks
"Tom B" <shuckle@hotmail.com> wrote in message
news:%23XTMB%235dDHA.3528@tk2msftngp13.phx.gbl...TOP:> Try cutting and pasting the following....it'll get you started....
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>
> <HTML><HEAD>
>
> <SCRIPT language=javascript id=clientEventHandlersJS>
> <!--
>
> var cursorPos;
>
> function saveCursorPos(){
> cursorPos=document.selection.createRange().duplica te();
> //alert('cursorPos='+ cursorPos.value );
>
> }
>
> function cmdBullet_onclick()
> {
>
> divDisplay.document.execCommand('insertunorderedli st','','');
> divDisplay.focus();
> return false;
>
>
>
> }
>
> function cmdSave_onclick() {
>
> //hiddenInput.value=divDisplay.innerHTML;
> theForm.hiddenInput.value=divDisplay.innerHTML;
> //theForm.hiddenProcInput.value=divProc.innerHTML;
>
> if (theForm.hiddenInput.value.length >102399)
> {
> alert('Document is too big:' + theForm.hiddenInput.value.length);
> return false;
>
> }
> if (theForm.Category.selectedIndex==0)
> {
> alert('Please select/create a Category');
> return false;
> }
> if (theForm.Code.value.length==0)
> {
> alert('Please enter a Policy Number');
> return false;
> }
> if (theForm.Title.value.length==0)
> {
> alert('Please enter a Policy Title');
> return false;
>
> }
> if (theForm.hiddenInput.value.length==0)
> {
> alert('Please enter the Policy Content.');
> return false;
> }
>
> theForm.submit();
>
>
> }
>
> function cmdNumbered_onclick() {
> divDisplay.document.execCommand('insertorderedlist ','','');
> divDisplay.focus();
> return false;
> }
>
> function cmdBold_onclick() {
>
> divDisplay.document.execCommand('bold','','');
> divDisplay.focus();
> return false;
>
> }
>
> function cmdItalic_onclick() {
> divDisplay.document.execCommand('italic','','');
> divDisplay.focus();
> return false;
> }
>
> function cmdTab_onclick() {
> divDisplay.document.execCommand('indent','','');
> divDisplay.focus();
> return false;
> }
>
> function cmdUnTab_onclick() {
> divDisplay.document.execCommand('outdent','','');
> divDisplay.focus();
> return false;
> }
>
>
>
> //-->
> </SCRIPT>
>
> </HEAD>
> <BODY>
>
>
> <DIV id=Layer1
> style="Z-INDEX: 3; LEFT: 631px; WIDTH: 96px; POSITION: absolute;200px"></DIV>> 9px; HEIGHT: 42px">
> <DIV align=right><A href="http://tbserver/CCAC_V_1_0/"><IMG
> src="Editor_files/close_spacer.gif" border=0></A></DIV></DIV>
> <DIV id=overDiv
> style="Z-INDEX: 1; LEFT: 300px; POSITION: absolute; TOP:value=UnTab> <SCRIPT language=JavaScript src="Editor_files/overlib.js"></SCRIPT>
>
> <H2 align=center><IMG height=50
> src="Editor_files/add_new_policy_header2.gif" width=600></H2>
> <FORM name=theForm action=SaveNew.asp method=post>
>
> <TABLE width=500>
> <TBODY>
> <TR>
> <TD>
> <FIELDSET><LEGEND><FONT size=2>Policy Content </FONT></LEGEND>
> <TABLE>
> <TBODY>
> <TR>
> <TH colSpan=3>
> <DIV align=center>
> <TABLE cellSpacing=0 cellPadding=0 align=center>
> <TBODY>
> <TR>
> <TD id=Bold width=31><INPUT language=javascript
> id=cmdBold onclick="return cmdBold_onclick()"
> type=image
> src="Editor_files/Bold.gif" value=Bold name=image>
> </TD>
> <TD id=Italic width=31><INPUT language=javascript
> id=cmdItalic onclick="return cmdItalic_onclick()"
> type=image src="Editor_files/Italic.gif"
> value=Italic
> name=image> </TD>
> <TD id=Bullet width=31><INPUT language=javascript
> id=cmdBullet onclick="return cmdBullet_onclick()"
> type=image src="Editor_files/Bullet.gif"
> value=Bullet
> name=cmdBullet> </TD>
> <TD id=Numbered width=31><INPUT language=javascript
> id=cmdNumbered onclick="return
> cmdNumbered_onclick()"
> type=image src="Editor_files/Numbered.gif"
> value=Numbered name=image> </TD>
> <TD id=Tab width=31><INPUT language=javascript
> id=cmdTab
> onclick="return cmdTab_onclick()" type=image
> src="Editor_files/tab.gif" value=Tab name=image>
> </TD>
> <TD id=UnTab width=31><INPUT language=javascript
> id=cmdUnTab onclick="return cmdUnTab_onclick()"
> type=image src="Editor_files/Untab.gif"onclick=cmdSave_onclick();> name=image> </TD>
> <TD id=UnTab width=311>
> <DIV align=right><IMG height=30
> src="Editor_files/add_policy_content.gif"
>
> width=200></DIV></TD></TR></TBODY></TABLE></DIV></TH></TR>
> <TR>
> <TD colSpan=3><INPUT style="WIDTH: 207px; HEIGHT: 22px"
> type=hidden size=26 name=hiddenInput>
> <TABLE onclick=divDisplay.focus(); borderColor=#9ea1d6
> height=100 cellSpacing=0 cellPadding=0 width=502
> align=center
> bgColor=#e5e6f3 border=1>
> <TBODY>
> <TR border="0">
> <TD vAlign=top width=500 border="0">
> <DIV id=divDisplay onkeyup=saveCursorPos();
> contentEditable=true
>
> name="divDisplay"></DIV></TD></TR></TBODY></TABLE></TD></TR>
> <TR>
> <TD align=right colSpan=3><INPUTof> type=button
>
> value="Next>>>"></TD></TR></TBODY></TABLE></FIELDSET>
> </TD></TR></TBODY></TABLE></FORM>
> </BODY></HTML>
>
>
> "monika" <monikadang@hotmail.com> wrote in message
> news:uBFRyw5dDHA.2524@TK2MSFTNGP09.phx.gbl...> or> > I want to use a simple editor which has the capability of changing color> > bold it... a very simple one in my application of asp/access. Can anyone
> > suggest any such editor whereby I can use it?
> > my purpose is to get story written by a student in the textbox/textarea>> > that editor from the database. The teacher highlights using the editor
> > features....making letters bold or in red to highlight changes. and then
> > save it to the database.
> >
> > later available for the student to view his changes.
> >
> > any help would be appreciable.
> > thanks
> >
> >
>
monika Guest
-
Tom B #5
Re: editor features?
Don't use value= as that's for an input box and this is a div within a table
cell
<DIV id=divDisplay onkeyup=saveCursorPos();
contentEditable=true
name="divDisplay"><%=rsa.fields("story_name")%></DIV>
You'll note that there is a hidden form field with the clever name
"hiddenInput" (don't ask why there are size values....my graphics guy)
when the Save button is clicked, the data with in the div is put into the
hidden field through the cmdSave_onClick function.
I just realized this really has nothing to do with asp and is all
client-side stuff. Feel free to respond to me directly, or post in a
javascript group.
Tom B
"monika" <monikadang@hotmail.com> wrote in message
news:uVz2lZ6dDHA.3660@TK2MSFTNGP11.phx.gbl...the> hi tom ..thanks for the quick response. I realise that here divDisplay is
> the object where i need to retrieve the value from the database. pls seeor> change i did to make it useful for my application:
> .
> .
> .
> .
> <%
> DIM RSA
> DIM QUERY
>
> Set RSA = Server.CreateObject("ADODB.Recordset")
> QUERY = "select story_name from story_table where story_id = 1"
> rsa.open query, "dsn=school"
> %>
> <TR>
> <TD colSpan=3><INPUT style="WIDTH: 207px; HEIGHT: 22px"
> type=hidden size=26 name=hiddenInput>
> <TABLE onclick=divDisplay.focus(); borderColor=#9ea1d6
> height=100 cellSpacing=0 cellPadding=0 width=502
> align=center bgColor=#e5e6f3 border=1
> value=<%=rsa.fields("story_name")%>>
> ..remaining code...
>
> but i dont the value being retrieved from the database? how can that be
> achieved?
> my purpose is to get the story from the database in the editable textboxsrc="Editor_files/overlib.js"></SCRIPT>> whatever and then save the content to the database after changing it?
>
> would be a great help if u respond.
> thanks
>
> "Tom B" <shuckle@hotmail.com> wrote in message
> news:%23XTMB%235dDHA.3528@tk2msftngp13.phx.gbl...> TOP:> > Try cutting and pasting the following....it'll get you started....
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> >
> > <HTML><HEAD>
> >
> > <SCRIPT language=javascript id=clientEventHandlersJS>
> > <!--
> >
> > var cursorPos;
> >
> > function saveCursorPos(){
> > cursorPos=document.selection.createRange().duplica te();
> > //alert('cursorPos='+ cursorPos.value );
> >
> > }
> >
> > function cmdBullet_onclick()
> > {
> >
> > divDisplay.document.execCommand('insertunorderedli st','','');
> > divDisplay.focus();
> > return false;
> >
> >
> >
> > }
> >
> > function cmdSave_onclick() {
> >
> > //hiddenInput.value=divDisplay.innerHTML;
> > theForm.hiddenInput.value=divDisplay.innerHTML;
> > //theForm.hiddenProcInput.value=divProc.innerHTML;
> >
> > if (theForm.hiddenInput.value.length >102399)
> > {
> > alert('Document is too big:' + theForm.hiddenInput.value.length);
> > return false;
> >
> > }
> > if (theForm.Category.selectedIndex==0)
> > {
> > alert('Please select/create a Category');
> > return false;
> > }
> > if (theForm.Code.value.length==0)
> > {
> > alert('Please enter a Policy Number');
> > return false;
> > }
> > if (theForm.Title.value.length==0)
> > {
> > alert('Please enter a Policy Title');
> > return false;
> >
> > }
> > if (theForm.hiddenInput.value.length==0)
> > {
> > alert('Please enter the Policy Content.');
> > return false;
> > }
> >
> > theForm.submit();
> >
> >
> > }
> >
> > function cmdNumbered_onclick() {
> > divDisplay.document.execCommand('insertorderedlist ','','');
> > divDisplay.focus();
> > return false;
> > }
> >
> > function cmdBold_onclick() {
> >
> > divDisplay.document.execCommand('bold','','');
> > divDisplay.focus();
> > return false;
> >
> > }
> >
> > function cmdItalic_onclick() {
> > divDisplay.document.execCommand('italic','','');
> > divDisplay.focus();
> > return false;
> > }
> >
> > function cmdTab_onclick() {
> > divDisplay.document.execCommand('indent','','');
> > divDisplay.focus();
> > return false;
> > }
> >
> > function cmdUnTab_onclick() {
> > divDisplay.document.execCommand('outdent','','');
> > divDisplay.focus();
> > return false;
> > }
> >
> >
> >
> > //-->
> > </SCRIPT>
> >
> > </HEAD>
> > <BODY>
> >
> >
> > <DIV id=Layer1
> > style="Z-INDEX: 3; LEFT: 631px; WIDTH: 96px; POSITION: absolute;> 200px"></DIV>> > 9px; HEIGHT: 42px">
> > <DIV align=right><A href="http://tbserver/CCAC_V_1_0/"><IMG
> > src="Editor_files/close_spacer.gif" border=0></A></DIV></DIV>
> > <DIV id=overDiv
> > style="Z-INDEX: 1; LEFT: 300px; POSITION: absolute; TOP:> > <SCRIPT language=JavaScript</FONT></LEGEND>> >
> > <H2 align=center><IMG height=50
> > src="Editor_files/add_new_policy_header2.gif" width=600></H2>
> > <FORM name=theForm action=SaveNew.asp method=post>
> >
> > <TABLE width=500>
> > <TBODY>
> > <TR>
> > <TD>
> > <FIELDSET><LEGEND><FONT size=2>Policy Contentname=image>> > <TABLE>
> > <TBODY>
> > <TR>
> > <TH colSpan=3>
> > <DIV align=center>
> > <TABLE cellSpacing=0 cellPadding=0 align=center>
> > <TBODY>
> > <TR>
> > <TD id=Bold width=31><INPUT language=javascript
> > id=cmdBold onclick="return cmdBold_onclick()"
> > type=image
> > src="Editor_files/Bold.gif" value=BoldcmdItalic_onclick()"> > </TD>
> > <TD id=Italic width=31><INPUT language=javascript
> > id=cmdItalic onclick="returncmdBullet_onclick()"> > type=image src="Editor_files/Italic.gif"
> > value=Italic
> > name=image> </TD>
> > <TD id=Bullet width=31><INPUT language=javascript
> > id=cmdBullet onclick="returnlanguage=javascript> > type=image src="Editor_files/Bullet.gif"
> > value=Bullet
> > name=cmdBullet> </TD>
> > <TD id=Numbered width=31><INPUTcolor> value=UnTab> > id=cmdNumbered onclick="return
> > cmdNumbered_onclick()"
> > type=image src="Editor_files/Numbered.gif"
> > value=Numbered name=image> </TD>
> > <TD id=Tab width=31><INPUT language=javascript
> > id=cmdTab
> > onclick="return cmdTab_onclick()" type=image
> > src="Editor_files/tab.gif" value=Tab name=image>
> > </TD>
> > <TD id=UnTab width=31><INPUT language=javascript
> > id=cmdUnTab onclick="return cmdUnTab_onclick()"
> > type=image src="Editor_files/Untab.gif"> onclick=cmdSave_onclick();> > name=image> </TD>
> > <TD id=UnTab width=311>
> > <DIV align=right><IMG height=30
> > src="Editor_files/add_policy_content.gif"
> >
> > width=200></DIV></TD></TR></TBODY></TABLE></DIV></TH></TR>
> > <TR>
> > <TD colSpan=3><INPUT style="WIDTH: 207px; HEIGHT: 22px"
> > type=hidden size=26 name=hiddenInput>
> > <TABLE onclick=divDisplay.focus(); borderColor=#9ea1d6
> > height=100 cellSpacing=0 cellPadding=0 width=502
> > align=center
> > bgColor=#e5e6f3 border=1>
> > <TBODY>
> > <TR border="0">
> > <TD vAlign=top width=500 border="0">
> > <DIV id=divDisplay onkeyup=saveCursorPos();
> > contentEditable=true
> >
> > name="divDisplay"></DIV></TD></TR></TBODY></TABLE></TD></TR>
> > <TR>
> > <TD align=right colSpan=3><INPUT> > type=button
> >
> > value="Next>>>"></TD></TR></TBODY></TABLE></FIELDSET>
> > </TD></TR></TBODY></TABLE></FORM>
> > </BODY></HTML>
> >
> >
> > "monika" <monikadang@hotmail.com> wrote in message
> > news:uBFRyw5dDHA.2524@TK2MSFTNGP09.phx.gbl...> > > I want to use a simple editor which has the capability of changinganyone> > or> > > bold it... a very simple one in my application of asp/access. Cantextbox/textarea> > > suggest any such editor whereby I can use it?
> > > my purpose is to get story written by a student in thethen> of> > > that editor from the database. The teacher highlights using the editor
> > > features....making letters bold or in red to highlight changes. and>> >> > > save it to the database.
> > >
> > > later available for the student to view his changes.
> > >
> > > any help would be appreciable.
> > > thanks
> > >
> > >
> >
>
Tom B Guest



Reply With Quote

