khagen
asked on
Word editor Object not working
I have an Object from Microsoft. It is a text manipulator. It makes the text bold, italic etc. I had been working with it on another site, and decided to upgrade a new sites admin tools with it. However, I believe to have the page all "Tweaked" on the new site, yet it is not working. The Text area is populating from the database (as queried through a combo box), however the command (bold, italic etc) buttons are not affecting the text in the text area. I believe to have the right code on the asp page, and think that I am not rferencing the object correctly, yet it works on the first site! Are there issues that I am not aware of? Here is the Referecing Code;
<TABLE width=100% align=center>
<TR>
<TD>
<!-- DHTML Editing control Object. This will be the body object for the toolbars. -->
<object ID="tbContentElement" style="width:600" CLASSID="clsid:2D360200-FF F5-11d1-8D 03-00A0C95 9BC0A" VIEWASTEXT>
<param name=Scrollbars value=true>
</object>
<!-- DEInsertTableParam Object -->
<object ID="ObjTableInfo" CLASSID="clsid:47B0DFC7-B7 A3-11D1-AD C5-006008A 5848C" VIEWASTEXT>
</object>
<!-- DEGetBlockFmtNamesParam Object -->
<object ID="ObjBlockFormatInfo" CLASSID="clsid:8D91090E-B9 55-11D1-AD C5-006008A 5848C" VIEWASTEXT>
</object>
</TD>
</TR>
<TR>
<TD align=center>
<INPUT type="submit" value="Update Page Description" id=button name=button onClick="submitForm()">
</TD>
</TR>
</TABLE>
Any Ideas ?(by the way, both sites are on the same server and in the same directory)
<TABLE width=100% align=center>
<TR>
<TD>
<!-- DHTML Editing control Object. This will be the body object for the toolbars. -->
<object ID="tbContentElement" style="width:600" CLASSID="clsid:2D360200-FF
<param name=Scrollbars value=true>
</object>
<!-- DEInsertTableParam Object -->
<object ID="ObjTableInfo" CLASSID="clsid:47B0DFC7-B7
</object>
<!-- DEGetBlockFmtNamesParam Object -->
<object ID="ObjBlockFormatInfo" CLASSID="clsid:8D91090E-B9
</object>
</TD>
</TR>
<TR>
<TD align=center>
<INPUT type="submit" value="Update Page Description" id=button name=button onClick="submitForm()">
</TD>
</TR>
</TABLE>
Any Ideas ?(by the way, both sites are on the same server and in the same directory)
I'm not sure what the problem is .. I run the script locally here and when the textarea comes up, I can use CTRL-B for bold, CTRL-I for italic .. is it not doing this for you? Is there supposed to be more? All I see is a textarea box and below it is a button to submit ..
-Aemergin
-Aemergin
ASKER
Yes, the CTRL-B is working, I forgot to give the code for the tool bar that is above the previous code;
<TABLE width=100% align=center>
<TR>
<TD align=left>
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Bold.gif')" id="DECMD_BOLD" name="DECMD_BOLD">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Italic.gif')" id="DECMD_ITALIC" name="DECMD_ITALIC">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Under.gif')" id="DECMD_UNDERLINE" name="DECMD_UNDERLINE">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Bullist.gif')" id="DECMD_UNORDERLIST" name="DECMD_UNORDERLIST">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Link.gif')" id="DECMD_HYPERLINK" name="DECMD_HYPERLINK">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Image.gif')" id="DECMD_IMAGE" name="DECMD_IMAGE">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Fgcolor.gif')" id="DECMD_SETFORECOLOR" name="DECMD_SETFORECOLOR">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Left.gif')" id="DECMD_JUSTIFYLEFT" name="DECMD_JUSTIFYLEFT">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Center.gif')" id="DECMD_JUSTIFYCENTER" name="DECMD_JUSTIFYCENTER" >
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Right.gif')" id="DECMD_JUSTIFYRIGHT" name="DECMD_JUSTIFYRIGHT">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Undo.gif')" id="DECMD_UNDO" name="DECMD_UNDO">
<F ONT face=Verdana,arial,tahoma size=2 color=#000000>Edit page description below</FONT>
</TD>
</TR>
</TABLE>
This tool bar is used in conjuction with a series of subs. The sub for the bold button is this;
sub DECMD_BOLD_onclick()
tbContentElement.ExecComma nd DECMD_BOLD,OLECMDEXECOPT_D ODEFAULT
self.focus
tbContentElement.focus
end sub
By the way, the other site has no Codebase with it and works fine.
<TABLE width=100% align=center>
<TR>
<TD align=left>
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<F
</TD>
</TR>
</TABLE>
This tool bar is used in conjuction with a series of subs. The sub for the bold button is this;
sub DECMD_BOLD_onclick()
tbContentElement.ExecComma
self.focus
tbContentElement.focus
end sub
By the way, the other site has no Codebase with it and works fine.
ASKER
Adjusted points to 75
Are you using the new and improved version for MSIE 5, or the original that runs on MSIE 4+? From what I understand (after reading through the MS site), the MSIE 5 version will only work in an MSIE 5 browser, and it must be the most current load of the browser (some betas did not work with this control).
You might want to redownload and reinstall the component from MS. I don't know that this will help, but if you're using the clsid for the old version, and writing subs for the new version, things aren't going to work out right.
On another note .. could you post your complete code, with the subs? I'm interested in exactly how it works, sounds like I've missed out on a real gem. ;)
-Aemergin
You might want to redownload and reinstall the component from MS. I don't know that this will help, but if you're using the clsid for the old version, and writing subs for the new version, things aren't going to work out right.
On another note .. could you post your complete code, with the subs? I'm interested in exactly how it works, sounds like I've missed out on a real gem. ;)
-Aemergin
ASKER
Here is the full Code,
I am using this successflly on another site, so the references are the same, as well I'm usin the same browser, and the sites are on the same server, all is the same. Just one does not work. The code is for the working page. It is handy (although not in netscape)
<%@ Language=VBScript %>
<%
if Session("loggedin")<>true then
Response.redirect("default .asp")
end if
%>
<HEAD>
<%
Response.Buffer()%>
<%const CONNECTIONSTRING="DSN=NPUP S97;uid=; pwd=;"%>
<%
Dim pageText,conn,rs,tmpStory, i,tmp,strG roups,rs2, strPicture , strTitle, strDate, strAuthor, strNewsID
set conn = CreateObject("ADODB.Connec tion")
set rs = server.createobject("adodb .recordset ")
set rs2 = server.createobject("adodb .recordset ")
conn.open CONNECTIONSTRING
response.write(request("Su bmit"))
if request.querystring("UPDAT E") = "TEXT" then
if Request.QueryString("ID")= "" or Request.QueryString("ID")= "0" then
conn.execute ("Insert Into News ( Title, NDate, Author, Story ) Values ( '" & request("Title") & "', '" & request("Date") & "', '" & request("Author") & "', '" & request("Story") & "')")
'Response.Write("inserted" )
elseif request.querystring("ID")< >"0" then
conn.execute ("UPDATE News SET Story = '" & request("story") & "', Title = '" & request("Title") & "', NDate = '" & request("Date") & "', Author = '" & request("Author") & "' WHERE NewsID = " & request.querystring("ID") & ";")
'Response.Write("updated")
end if
end if
if request.querystring("Delet e") <> Empty then
conn.execute ("Delete From News WHERE NewsID = " & request.querystring("Delet e") & ";")
end if
' vb is not a real language if I do this:
' if false and (2nd statement) then
' it still runs 2nd statement, real languages know not to run
' 2nd statement so I have to do an akward statement:
if Request.querystring("ID")< >"" then
if cint(request.querystring(" ID")) > 0 then
rs = conn.execute("SELECT * from News WHERE NewsID = " & request.querystring("ID"))
tmp = rs("Story")
strNewsID = rs("NewsID")
strTitle = rs("Title")
strDate = rs("NDate")
strAuthor = rs("Author")
i=1
tmpStory = ""
while (i < len(tmp))
if (CStr(mid(tmp,i,1)) <> CStr(chr(13))) and (CStr(mid(tmp,i,1)) <> CStr(chr(10))) and (CStr(mid(tmp,i,1)) <> CStr(chr(34))) and (CStr(mid(tmp,i,1)) <> CStr(chr(39))) then
tmpStory = tmpStory & CStr(mid(tmp,i,1))
end if
i=i+1
wend
end if
end if
rs2.open "SELECT NewsID, title from News ORDER BY NDate",conn
strGroups = "<OPTION SELECTED value='0'>-- Add New --</OPTION>"
while not rs2.eof
' same lame deal as before, vb as a language is designed by focus groups
' not programmers.
if Request.QueryString("ID")< >"" then
if CInt(request("ID")) = CInt(rs2("NewsID")) then
strGroups = strGroups & "<OPTION SELECTED value='" & rs2("NewsID") & "'>" & rs2("title") & "</OPTION>"
else
strGroups = strGroups & "<OPTION value='" & rs2("NewsID") & "'>" & rs2("title") & "</OPTION>"
end if
else
strGroups = strGroups & "<OPTION value='" & rs2("NewsID") & "'>" & rs2("title") & "</OPTION>"
end if
rs2.movenext
wend
rs2.close
%>
<script language="VBScript">
<!--
//globals
<!--#include file="./dhtmled.js"-->
sub pages_onChange()
if document.forms(0).pages.va lue <> "" then
window.location.href="Edit News.asp?I D=" & document.forms(0).pages.va lue
end if
end sub
sub DECMD_BOLD_onclick()
tbContentElement.ExecComma nd DECMD_BOLD,OLECMDEXECOPT_D ODEFAULT
self.focus
tbContentElement.focus
end sub
sub DECMD_UNDERLINE_onclick()
tbContentElement.ExecComma nd DECMD_UNDERLINE,OLECMDEXEC OPT_DODEFA ULT
self.focus
tbContentElement.focus
end sub
sub DECMD_ITALIC_onclick()
tbContentElement.ExecComma nd DECMD_ITALIC,OLECMDEXECOPT _DODEFAULT
self.focus
tbContentElement.focus
end sub
sub DECMD_HYPERLINK_onclick()
tbContentElement.ExecComma nd DECMD_HYPERLINK,OLECMDEXEC OPT_DODEFA ULT
self.focus
tbContentElement.focus
end sub
sub DECMD_SETFORECOLOR_onclick ()
dim arr
arr = showModalDialog( "./selcolor.htm","","font- family:Ver dana; font-size:12; dialogWidth:30em; dialogHeight:30em" )
'if (arr <> null) then
tbContentElement.ExecComma nd DECMD_SETFORECOLOR,OLECMDE XECOPT_DOD EFAULT, arr
'end if
end sub
sub DECMD_UNORDERLIST_onclick( )
tbContentElement.ExecComma nd DECMD_UNORDERLIST,OLECMDEX ECOPT_DODE FAULT
tbContentElement.focus()
end sub
sub DECMD_UNDO_onclick()
tbContentElement.ExecComma nd DECMD_UNDO,OLECMDEXECOPT_D ODEFAULT
self.focus()
tbContentElement.focus()
end sub
sub submitForm()
dim i,tmp
tmp = tbContentElement.DocumentH TML
i=1
tmpStory = ""
while (i < len(CStr(tmp)))
if (CStr(mid(tmp,i,1)) <> CStr(chr(13))) and (CStr(mid(tmp,i,1)) <> CStr(chr(10))) and (CStr(mid(tmp,i,1)) <> CStr(chr(34))) and (CStr(mid(tmp,i,1)) <> CStr(chr(39))) then
tmpStory = tmpStory & CStr(mid(tmp,i,1))
end if
i=i+1
wend
document.forms(0).action=" EditNews.a sp?UPDATE= TEXT&ID=" & document.forms(0).pages.va lue
document.forms(0).Story.va lue=tmpSto ry
document.forms(0).submit()
end sub
sub window_onLoad()
tbContentElement.DocumentH TML="<%=tm pStory%>"
end sub
sub DECMD_JUSTIFYCENTER_onclic k()
tbContentElement.ExecComma nd DECMD_JUSTIFYCENTER,OLECMD EXECOPT_DO DEFAULT
self.focus
tbContentElement.focus
end sub
sub DECMD_JUSTIFYLEFT_onclick( )
tbContentElement.ExecComma nd DECMD_JUSTIFYLEFT,OLECMDEX ECOPT_DODE FAULT
self.focus
tbContentElement.focus
end sub
sub DECMD_JUSTIFYRIGHT_onclick ()
tbContentElement.ExecComma nd DECMD_JUSTIFYRIGHT,OLECMDE XECOPT_DOD EFAULT
self.focus
tbContentElement.focus
end sub
sub DECMD_IMAGE_onclick()
tbContentElement.ExecComma nd DECMD_IMAGE,OLECMDEXECOPT_ DODEFAULT
self.focus
tbContentElement.focus
end sub
-->
</script>
</HEAD>
<BODY bgcolor="#CC9966">
<center>
<p><img src="../images/top_hdrlogo .gif" height="14"><br>
<img src="../images/middle_hdrl ogo.gif" height="13"><br>
<img src="../images/bottom_hdrl ogo.gif" height="16"><br>
<img src="../images/bottom_logo _nav.gif" height="14"></p>
</center>
<FORM name=Form1 id=Form1 Method=Post Action="EditNews.asp">
<TABLE WIDTH=600 BORDER=0 CELLSPACING=0 CELLPADDING=0 align=center>
<TR>
<TD align=middle border=0>
<FONT face=Verdana,arial,tahoma size=2 color=#000000><B>News & Information Administration</B></FONT>
</TD>
</TR>
<TR>
<TD align=middle background=../images/heade rs/fill.gi f>
</TD>
</TR>
<TR>
<TD align=left valign=top>
<BR><BR>
<TABLE border=0 width=100%>
<TR>
<TD align=right valign=top width=55% height=60>
<FONT face=Verdana,arial,tahoma size=2 color=#000000>Choose the title of the News Story you wish to edit:</FONT>
</TD>
<TD align=left valign=top>
<SELECT id=pages name=pages style="WIDTH: 100%">
<%=strGroups%>
</SELECT>
</TD>
</TR>
<TR>
<TD align=right valign=top width=55% height=60>
<FONT face=Verdana,arial,tahoma size=2 color=#000000>Enter or modify the News Story Title:</FONT>
</TD>
<TD align=left valign=top>
<INPUT name="Title" value="<%=strTitle%>">
</TD>
</TR>
<TR>
<TD align=right valign=top width=55% height=60>
<FONT face=Verdana,arial,tahoma size=2 color=#000000>Enter or modify the news date:</FONT>
</TD>
<TD align=left valign=top>
<INPUT name="Date" value="<%=strDate%>">
</TD>
</TR>
<TR>
<TD align=right valign=top width=55% height=60>
<FONT face=Verdana,arial,tahoma size=2 color=#000000>Enter or modify the author's name:</FONT>
</TD>
<TD align=left valign=top>
<INPUT name="Author" value="<%=strAuthor%>">
</TD>
</TR>
<TR>
<TD colspan=2 align=center valign=top width=55% height=60>
<FONT face=Verdana,arial,tahoma size=2 color=#000000><A href="EditNews.asp?Delete= <%=strNews ID%>">Dele te</A></FO NT>
</TD>
</TR>
</TABLE>
<TABLE>
</TD>
</TR>
<TR>
<TD>
<BR>
<INPUT type=hidden name="Story" id="Story" value="<%=tmpStory%>">
</Table>
</FORM>
<TABLE width=100% align=center>
<TR>
<TD align=left>
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Bold.gif')" id="DECMD_BOLD" name="DECMD_BOLD">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Italic.gif')" id="DECMD_ITALIC" name="DECMD_ITALIC">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Under.gif')" id="DECMD_UNDERLINE" name="DECMD_UNDERLINE">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Bullist.gif')" id="DECMD_UNORDERLIST" name="DECMD_UNORDERLIST">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Link.gif')" id="DECMD_HYPERLINK" name="DECMD_HYPERLINK">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Image.gif')" id="DECMD_IMAGE" name="DECMD_IMAGE">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Fgcolor.gif')" id="DECMD_SETFORECOLOR" name="DECMD_SETFORECOLOR">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Left.gif')" id="DECMD_JUSTIFYLEFT" name="DECMD_JUSTIFYLEFT">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Center.gif')" id="DECMD_JUSTIFYCENTER" name="DECMD_JUSTIFYCENTER" >
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Right.gif')" id="DECMD_JUSTIFYRIGHT" name="DECMD_JUSTIFYRIGHT">
<input type="button" style="width:30;BACKGROUND -IMAGE: url('IMAGES\Undo.gif')" id="DECMD_UNDO" name="DECMD_UNDO">
<F ONT face=Verdana,arial,tahoma size=2 color=#000000>Edit page description below</FONT>
</TD>
</TR>
</TABLE>
<TABLE width=100% align=center>
<TR>
<TD>
<!-- DHTML Editing control Object. This will be the body object for the toolbars. -->
<object ID="tbContentElement" style="width:600" CLASSID="clsid:2D360200-FF F5-11d1-8D 03-00A0C95 9BC0A" VIEWASTEXT>
<param name=Scrollbars value=true>
</object>
<!-- DEInsertTableParam Object -->
<object ID="ObjTableInfo" CLASSID="clsid:47B0DFC7-B7 A3-11D1-AD C5-006008A 5848C" VIEWASTEXT>
</object>
<!-- DEGetBlockFmtNamesParam Object -->
<object ID="ObjBlockFormatInfo" CLASSID="clsid:8D91090E-B9 55-11D1-AD C5-006008A 5848C" VIEWASTEXT>
</object>
</TD>
</TR>
<TR>
<TD align=center>
<INPUT type="submit" value="Update Page Description" id=button name=button onClick="submitForm()">
</TD>
</TR>
</TABLE>
</Table>
<!--#include file="adminnav.inc" -->
</BODY>
<%
conn.close
set rs=nothing
set conn=nothing
%>
I am using this successflly on another site, so the references are the same, as well I'm usin the same browser, and the sites are on the same server, all is the same. Just one does not work. The code is for the working page. It is handy (although not in netscape)
<%@ Language=VBScript %>
<%
if Session("loggedin")<>true then
Response.redirect("default
end if
%>
<HEAD>
<%
Response.Buffer()%>
<%const CONNECTIONSTRING="DSN=NPUP
<%
Dim pageText,conn,rs,tmpStory,
set conn = CreateObject("ADODB.Connec
set rs = server.createobject("adodb
set rs2 = server.createobject("adodb
conn.open CONNECTIONSTRING
response.write(request("Su
if request.querystring("UPDAT
if Request.QueryString("ID")=
conn.execute ("Insert Into News ( Title, NDate, Author, Story ) Values ( '" & request("Title") & "', '" & request("Date") & "', '" & request("Author") & "', '" & request("Story") & "')")
'Response.Write("inserted"
elseif request.querystring("ID")<
conn.execute ("UPDATE News SET Story = '" & request("story") & "', Title = '" & request("Title") & "', NDate = '" & request("Date") & "', Author = '" & request("Author") & "' WHERE NewsID = " & request.querystring("ID") & ";")
'Response.Write("updated")
end if
end if
if request.querystring("Delet
conn.execute ("Delete From News WHERE NewsID = " & request.querystring("Delet
end if
' vb is not a real language if I do this:
' if false and (2nd statement) then
' it still runs 2nd statement, real languages know not to run
' 2nd statement so I have to do an akward statement:
if Request.querystring("ID")<
if cint(request.querystring("
rs = conn.execute("SELECT * from News WHERE NewsID = " & request.querystring("ID"))
tmp = rs("Story")
strNewsID = rs("NewsID")
strTitle = rs("Title")
strDate = rs("NDate")
strAuthor = rs("Author")
i=1
tmpStory = ""
while (i < len(tmp))
if (CStr(mid(tmp,i,1)) <> CStr(chr(13))) and (CStr(mid(tmp,i,1)) <> CStr(chr(10))) and (CStr(mid(tmp,i,1)) <> CStr(chr(34))) and (CStr(mid(tmp,i,1)) <> CStr(chr(39))) then
tmpStory = tmpStory & CStr(mid(tmp,i,1))
end if
i=i+1
wend
end if
end if
rs2.open "SELECT NewsID, title from News ORDER BY NDate",conn
strGroups = "<OPTION SELECTED value='0'>-- Add New --</OPTION>"
while not rs2.eof
' same lame deal as before, vb as a language is designed by focus groups
' not programmers.
if Request.QueryString("ID")<
if CInt(request("ID")) = CInt(rs2("NewsID")) then
strGroups = strGroups & "<OPTION SELECTED value='" & rs2("NewsID") & "'>" & rs2("title") & "</OPTION>"
else
strGroups = strGroups & "<OPTION value='" & rs2("NewsID") & "'>" & rs2("title") & "</OPTION>"
end if
else
strGroups = strGroups & "<OPTION value='" & rs2("NewsID") & "'>" & rs2("title") & "</OPTION>"
end if
rs2.movenext
wend
rs2.close
%>
<script language="VBScript">
<!--
//globals
<!--#include file="./dhtmled.js"-->
sub pages_onChange()
if document.forms(0).pages.va
window.location.href="Edit
end if
end sub
sub DECMD_BOLD_onclick()
tbContentElement.ExecComma
self.focus
tbContentElement.focus
end sub
sub DECMD_UNDERLINE_onclick()
tbContentElement.ExecComma
self.focus
tbContentElement.focus
end sub
sub DECMD_ITALIC_onclick()
tbContentElement.ExecComma
self.focus
tbContentElement.focus
end sub
sub DECMD_HYPERLINK_onclick()
tbContentElement.ExecComma
self.focus
tbContentElement.focus
end sub
sub DECMD_SETFORECOLOR_onclick
dim arr
arr = showModalDialog( "./selcolor.htm","","font-
'if (arr <> null) then
tbContentElement.ExecComma
'end if
end sub
sub DECMD_UNORDERLIST_onclick(
tbContentElement.ExecComma
tbContentElement.focus()
end sub
sub DECMD_UNDO_onclick()
tbContentElement.ExecComma
self.focus()
tbContentElement.focus()
end sub
sub submitForm()
dim i,tmp
tmp = tbContentElement.DocumentH
i=1
tmpStory = ""
while (i < len(CStr(tmp)))
if (CStr(mid(tmp,i,1)) <> CStr(chr(13))) and (CStr(mid(tmp,i,1)) <> CStr(chr(10))) and (CStr(mid(tmp,i,1)) <> CStr(chr(34))) and (CStr(mid(tmp,i,1)) <> CStr(chr(39))) then
tmpStory = tmpStory & CStr(mid(tmp,i,1))
end if
i=i+1
wend
document.forms(0).action="
document.forms(0).Story.va
document.forms(0).submit()
end sub
sub window_onLoad()
tbContentElement.DocumentH
end sub
sub DECMD_JUSTIFYCENTER_onclic
tbContentElement.ExecComma
self.focus
tbContentElement.focus
end sub
sub DECMD_JUSTIFYLEFT_onclick(
tbContentElement.ExecComma
self.focus
tbContentElement.focus
end sub
sub DECMD_JUSTIFYRIGHT_onclick
tbContentElement.ExecComma
self.focus
tbContentElement.focus
end sub
sub DECMD_IMAGE_onclick()
tbContentElement.ExecComma
self.focus
tbContentElement.focus
end sub
-->
</script>
</HEAD>
<BODY bgcolor="#CC9966">
<center>
<p><img src="../images/top_hdrlogo
<img src="../images/middle_hdrl
<img src="../images/bottom_hdrl
<img src="../images/bottom_logo
</center>
<FORM name=Form1 id=Form1 Method=Post Action="EditNews.asp">
<TABLE WIDTH=600 BORDER=0 CELLSPACING=0 CELLPADDING=0 align=center>
<TR>
<TD align=middle border=0>
<FONT face=Verdana,arial,tahoma size=2 color=#000000><B>News & Information Administration</B></FONT>
</TD>
</TR>
<TR>
<TD align=middle background=../images/heade
</TD>
</TR>
<TR>
<TD align=left valign=top>
<BR><BR>
<TABLE border=0 width=100%>
<TR>
<TD align=right valign=top width=55% height=60>
<FONT face=Verdana,arial,tahoma size=2 color=#000000>Choose the title of the News Story you wish to edit:</FONT>
</TD>
<TD align=left valign=top>
<SELECT id=pages name=pages style="WIDTH: 100%">
<%=strGroups%>
</SELECT>
</TD>
</TR>
<TR>
<TD align=right valign=top width=55% height=60>
<FONT face=Verdana,arial,tahoma size=2 color=#000000>Enter or modify the News Story Title:</FONT>
</TD>
<TD align=left valign=top>
<INPUT name="Title" value="<%=strTitle%>">
</TD>
</TR>
<TR>
<TD align=right valign=top width=55% height=60>
<FONT face=Verdana,arial,tahoma size=2 color=#000000>Enter or modify the news date:</FONT>
</TD>
<TD align=left valign=top>
<INPUT name="Date" value="<%=strDate%>">
</TD>
</TR>
<TR>
<TD align=right valign=top width=55% height=60>
<FONT face=Verdana,arial,tahoma size=2 color=#000000>Enter or modify the author's name:</FONT>
</TD>
<TD align=left valign=top>
<INPUT name="Author" value="<%=strAuthor%>">
</TD>
</TR>
<TR>
<TD colspan=2 align=center valign=top width=55% height=60>
<FONT face=Verdana,arial,tahoma size=2 color=#000000><A href="EditNews.asp?Delete=
</TD>
</TR>
</TABLE>
<TABLE>
</TD>
</TR>
<TR>
<TD>
<BR>
<INPUT type=hidden name="Story" id="Story" value="<%=tmpStory%>">
</Table>
</FORM>
<TABLE width=100% align=center>
<TR>
<TD align=left>
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<input type="button" style="width:30;BACKGROUND
<F
</TD>
</TR>
</TABLE>
<TABLE width=100% align=center>
<TR>
<TD>
<!-- DHTML Editing control Object. This will be the body object for the toolbars. -->
<object ID="tbContentElement" style="width:600" CLASSID="clsid:2D360200-FF
<param name=Scrollbars value=true>
</object>
<!-- DEInsertTableParam Object -->
<object ID="ObjTableInfo" CLASSID="clsid:47B0DFC7-B7
</object>
<!-- DEGetBlockFmtNamesParam Object -->
<object ID="ObjBlockFormatInfo" CLASSID="clsid:8D91090E-B9
</object>
</TD>
</TR>
<TR>
<TD align=center>
<INPUT type="submit" value="Update Page Description" id=button name=button onClick="submitForm()">
</TD>
</TR>
</TABLE>
</Table>
<!--#include file="adminnav.inc" -->
</BODY>
<%
conn.close
set rs=nothing
set conn=nothing
%>
Wow .. that's a lot of code. ;)
Thanks, I'll mess with it and see what I can come up with, if nobody posts an answer by the time I figure it out, I'll let you know.
-Aemergin
Thanks, I'll mess with it and see what I can come up with, if nobody posts an answer by the time I figure it out, I'll let you know.
-Aemergin
ASKER
Is There another object or piece of code anyone knows about that could do the same job? The control would have to bold, hyperlink, colour, italic etc, a piece of text that was inserted in a text area.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think that is needed although I stand corrected if it is different using DHTML
Editing Control Objects. I am just pointing out what I noticed missing!