function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SirishaMSirishaM 

Body did not Load -error

Hi,

I wrote a VF page using the same yahoo tool bar used in blog application.
 
My page is sometimes loading properly sometimes it is not.

This is the code I used:
Code:
<apex:page showHeader='true' standardcontroller="Assignment__c">
<apex:form>
<apex:pageBlock>
<!-- Skin CSS file -->
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/skin.css" ></link>

<!-- Utility Dependencies -->
<script src="http://yui.yahooapis.com/2.3.0/build/utilities/utilities.js"></script>

<!-- Needed for Menus, Buttons and Overlays used in the Toolbar -->
<script src="http://yui.yahooapis.com/2.3.0/build/container/container-min.js"></script>
<script src="http://yui.yahooapis.com/2.3.0/build/menu/menu-min.js"></script>
<script src="http://yui.yahooapis.com/2.3.0/build/button/button-beta-min.js"></script>

<!-- Source file for Rich Text Editor-->
<script src="http://yui.yahooapis.com/2.3.0/build/editor/editor-beta-min.js"></script>



<div class="yui-skin-sam" style="display:none" id="editor" align="center" ><p />
<h2>Assignment Description </h2>
<apex:pageBlockSection>
<apex:inputField value="{!Assignment__c.Course__c}" />
<apex:inputField id="Duedate" value="{!Assignment__c.Due_Date__c}" />
</apex:pageBlockSection>

<apex:inputtextarea id="Description" cols="500" rows="50" value="{!Assignment__c.Description__c}"/>
<apex:commandButton value="Save" action="{!Save}" onClick="beforeTextSave()"/>
<p />
</div>


<script type="text/javascript" >
var myEditor;
window.onload = function init() {
myEditor = new YAHOO.widget.Editor('{!$component.Description}', {
height: '400px', width: '722px', dompath: true, animate: true });
myEditor.render();
document.getElementById('editor').style.display='';
}
function beforeTextSave() {
document.getElementById('{!$component.Description}').value = myEditor.getEditorHTML();
}

</script>
</apex:pageBlock>
</apex:form></apex:page>

 
where Assignment is my custom object,
 Description,duedate are custom fields

Can anybody please tell me whats wrong in the code ?

Thanks,
Sirisha
Ron HessRon Hess

the old example is due for a re-write.

This works with no errors:

Code:
<apex:page showHeader='true' standardcontroller="Blog_Post__c">
<apex:form>
<apex:pageBlock title="Blog Edit">

<div id="editor align="center">
<p />
<h2>Blog Title:</h2>&nbsp;&nbsp;&nbsp;&nbsp;
<apex:inputField value="{!Blog_Post__c.Name}" />
&nbsp;&nbsp;&nbsp;
<apex:commandButton value="Save" action="{!Save}" />
<p /><h2>Blog Body</h2><br />
<div style="background: white none repeat scroll 0% 50%;" >
<apex:inputtextarea richText="true" id="msgpost" cols="500"
rows="40"
value="{!Blog_Post__c.Post__c}" />
</div>
</div>
</apex:pageBlock>
</apex:form>

</apex:page>

 



Message Edited by Ron Hess on 05-14-2008 11:52 PM
SirishaMSirishaM
I really appreciate your timely replies..

Thanks again !!
Sirisha

TehNrdTehNrd
It looks like the rows and cols attributes no longer have any affect on height if richText="true". Anyone know how to adjust the height?
TehNrdTehNrd