1) make sure your cfc function that processes the textarea content has
access="remote"
2) create a button on your page to click to pass the textarea content to
your cfc function
3) add onclick="showContent('id-of-your-textarea-here');" to this button
(replace 'id-of-your-textarea-here' with actual ID of your textarea!)
4) put this showContent js function into HEAD section of your page,
making any necessary changes to it as per comments:
<script type="text/javascript">
var showContent = function(id) {
$.get(
"path/to/yourcfc.cfc?method=yourCfcFunctionName&content="+$("#"+id).val(),
// amend as necessary
function(data) {
//code here to do whatever you need with returned formatted content
//the returned content will be in js variable 'data'
},
'json' // change to data type of returnformat of your cfc fucntion
);
};
</script>
hth
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
On 04/06/2009 07:03, Mike Little wrote:
> thanks guys,
>
> my question is though - how to pass formatted content from my textarea to the
> div upon form submission (or another button submit). ultimately i would like
> to pass the content to a cfc first to check and amend data as required so
> this is why i thought jquery would be the way to go.
>
> mike
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323148
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4