Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHTML Editor

Status
Not open for further replies.

irate

Programmer
Joined
Jan 29, 2001
Messages
92
Location
GB
I am using an active-x control from microsoft for users of a website to edit certain pages:


I have the component working and customised as i want, but the save function built in to this only saves to local machine, I want my user to be able to create a document and then save the HTML to the server.

I know this isnt very detailed but any help or pointers would be great. Thanks
 
irate,

I took a quick look at the site you referenced.

Since your asking this in the ASP thread we will assume you have web activated this application.

The issue is the Common Dialog box will only allow the user to save locally or locally recognized MAPPED drives. So unless you allow your users to map to the drive on the web server (not a good idea), then there is no way this will work for you that I know of.

The alternative is to look at disabling the save function.

look at:
"The DHTML Editing control supports two methods that work directly against files on disk: LoadDocument and SaveDocument. Both of these methods simply take paths and file names as parameters and then handle the lower-level jobs of opening and closing files as needed. Both also support an option that allows you to display standard Windows dialog boxes (Open and Save As) to find documents or directories.

Note The version of the DHTML Editing control marked as safe for scripting does not support either of these methods."

What I would suggest as an alternative is to look at using the FileSystem Object (FSO) to write out the text HTML code to the file from an .ASP page. Then you can control where it goes. Would still have to address the issue of file naming, and other issues, but you would be incontrol.

Hope this helps.
DougCranston
 
Hi, thanks for the reply...

I managed to edit all the toolbars and javascript in the smaple you can download from the msdn site until it was exactly how I wanted it, then I tried to use some javascript to retrieve the contents of the iframe but I couldnt get it formatted properly.

In the end I have decided not to use the active-x control. I can do pretty much the same sort of thing using a textaera and javascript, the only difference is that the text inside the textarea doesn't look formatted like in word.

But I just show html tags instead, then use asp to request the textarea contents and write it to a text file on the server, which can be requesed by other pages and displayed as normal content. It is easy this way and you don't need the office CD to install the active-x control.

But thanks anyway...
:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top