You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Stewart, Gary" <Ga...@luht.scot.nhs.uk> on 2006/05/26 17:56:13 UTC

CForms: Inserting Text Into HTMLArea

I'm using the HTMLArea component of CForms (though I did upgrade it to Xinha but most of the calls seem the same). I've got a javascript in my CForms definition file that attempts to add text to that component. However I've had difficulty accessing the object. I did a cocoon log output on the lookup and that returns null. Is there a way to access the HTML component from the definition?

I tried something like:

var cc = event.source.parent.lookupWidget("cctext").getValue();
cocoon.log.info("Lets check out the object: " + cc);

but that returns null (after entering text to try and check that the object was created.

Thanks,

Gary

*****************************************************************
The information contained in this message may be confidential or 
legally privileged and is intended for the addressee only. If you 
have received this message in error or there are any problems 
please notify the originator immediately. The unauthorised use, 
disclosure, copying or alteration of this message is 
strictly forbidden.
*****************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: CForms: Inserting Text Into HTMLArea

Posted by Jeroen Reijn <j....@hippo.nl>.
Hi Gary,

just to be sure. Reading your email you have a javascript that adds text to the HTMLArea object?
HTMLArea puts the text back to the textarea on the onUnload event. Are you sure it get's saved back to the textarea?

Reijn





Stewart, Gary wrote:
> I'm using the HTMLArea component of CForms (though I did upgrade it to Xinha but most of the calls seem the same). I've got a javascript in my CForms definition file that attempts to add text to that component. However I've had difficulty accessing the object. I did a cocoon log output on the lookup and that returns null. Is there a way to access the HTML component from the definition?
> 
> I tried something like:
> 
> var cc = event.source.parent.lookupWidget("cctext").getValue();
> cocoon.log.info("Lets check out the object: " + cc);
> 
> but that returns null (after entering text to try and check that the object was created.
> 
> Thanks,
> 
> Gary
> 
> *****************************************************************
> The information contained in this message may be confidential or 
> legally privileged and is intended for the addressee only. If you 
> have received this message in error or there are any problems 
> please notify the originator immediately. The unauthorised use, 
> disclosure, copying or alteration of this message is 
> strictly forbidden.
> *****************************************************************
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org