Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
    
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 –  Amit Kumawat Nov 2 '11 at 11:39

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer
    
Ok, I have comment on the question sharepoint.stackexchange.com/questions/22528/… –  Larry Morries Nov 3 '11 at 5:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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