I have a Jquery varibale which stores long text, because of the string length i am not able to set the value to textarea.
can any one tell how we can split and set value to textarea. Like lets say split 500 characters and finally add 500 characters + 500 characters.... till end of text..
<script type="text/javascript">
$(window).load(function () {
jQuery("#DIDExcDivision").on('change', function () {
var res = '[fname], I work in the [divname] Single Global Currency (SGC) program and am following up on a referral where you are listed as the person executing the transaction. Appreciated if you could provide a feedback on the below questions.
https://dapam.csintra.net/strategicreferraltracking/CSOForm.aspx?Group=REA&LogId=[EncryptedId] Referrer Contribution 1. Do you support [nameofreferral]'s claim for SGC attribution on this transaction? 2. If so, is SGC attribution based on: (select all applicable) a. Introduction of a new client to the investment bank b. Origination of a new transaction/mandate for the [divname] c. Participation in the execution of a transaction d. Other (please expand in detail) 3. Is this the first time [divname] has done business with the client? 4. Would the transaction have been reasonably secure without the involvement of the referral lead? Economics 1. Has the transaction closed? a. Yes – please provide booking references, and department/book b. No - please provide expected close date 2. Describe the transaction (eg trade description, notional, pricing, revenue) 3. Has the transaction revenue been recognized? a. Provide p&l computation b. Provide computation of capital, funding, and other variable charges 4. Will there be future revenue recognition related to this transaction? 5. Is this transaction eligible for any other joint venture or revenue sharing agreement? Many thanks and regards, [ibSignature]'
var tokens = res.split(' ');
var n = Math.floor(tokens.length/2);
var finres = '<p>' + tokens.slice(0, n).join(' ') + '</p><p>' + tokens.slice(n + 1, tokens.length).join(' ') + '</p>';
$(tinymce.get('exc_body').getBody()).html(finres);
});
});
</script>