Ticket #1903: function_update.txt

File function_update.txt, 1.0 KB (added by Wojciech Olchawa, 13 years ago)
Line 
1function update()
2
3    {
4
5        var FCK = window.opener.FCKeditorAPI.GetInstance('ctl00_cph_FCKeditor1') ; var str = FCK.GetXHTML( true ); if(document.getElementById('Radio1').checked) {
6
7            str=str.replace(/{u_mergefield}/g,"{u_fname}")
8
9        } else if(document.getElementById('Radio2').checked) {
10
11            str=str.replace(/{u_mergefield}/g,"{u_lname}")
12
13        } else if(document.getElementById('Radio3').checked) {
14
15            str=str.replace(/{u_mergefield}/g,"{u_street}")
16
17        } else if(document.getElementById('Radio4').checked) {
18
19            str=str.replace(/{u_mergefield}/g,"{u_city}")
20
21        } else if(document.getElementById('Radio5').checked) {
22
23            str=str.replace(/{u_mergefield}/g,"{u_state}")
24
25        } else if(document.getElementById('Radio6').checked) {
26
27            str=str.replace(/{u_mergefield}/g,"{u_zip}")
28
29        } else {
30
31            str=str.replace(/{u_mergefield}/g,"");
32
33        } FCK.SetHTML(str); delete str; delete FCK; window.close(); return(false);
34
35    }
© 2003 – 2020 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy