0

Question

How do I import the ows.js into the a aspx file that I have customized inside a SharePoint 2007 site?

For Your Info

Just in case you might wonder what does ows.js got to do with SharePoint, please refer to this link: http://bloggingabout.net/blogs/jpsmit/archive/2005/05/30/4957.aspx



Extract from the link

First of all the Text Editor is a plain DHTML editor. It uses a TextArea and an IFrame, just like the well known DHTML editor.

The Text Editor is wrapped in a user control:

When the page is rendered, the Text Editor is converted into a TextArea:

<TEXTAREA id=TextEditor style="WIDTH: 600px; HEIGHT: 800px" name=TextEditor>....</TEXTAREA>

Also at the bottom of the page the following Javascript is added:

RTE_ConvertTextAreaToRichEdit ("TextEditor", ...)

This function is located in the ows.js and does exactly what it looks like it does. It looks up the TextArea and converts it into the DHTML control. It leaves the TextArea alone but adds an IFrame and toolbars for the editor.

The function RTE_GiveEditorFirstFocus("TextEditor") moves the focus to the just created editor. Also an event is attached to the IFrame which makes sure that the content in the editor is moved to the text area after the user presses the submit button. It uses the following function for that:

RTE_TransferIFrameContentsToTextArea("TextEditor")

All Javascript is located in the ows.js file.

1
  • what you mean by import exactly? To me it looks like you need reference of ows.js in your page. If so, do it with script tag Nov 2, 2011 at 11:39

1 Answer 1

0

You need not import ows.js (not sure what is that script). The functions you need are defined in form.js

Check out my answer to your related question :

How do use RTE_ConvertTextAreaToRichEdit() function in a customized aspx page in SharePoint 2007

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.