Changes between Initial Version and Version 1 of Ticket #1903


Ignore:
Timestamp:
Feb 21, 2008, 1:49:40 PM (16 years ago)
Author:
Wojciech Olchawa
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1903

    • Property Milestone changed from FCKeditor 2.6 to
  • Ticket #1903 – Description

    initial v1  
    1414Javascript for that function:
    1515
    16 function test()
    17         {
    18             var FCK = FCKeditorAPI.GetInstance('<%=FCKeditor1.ClientID %>') ;
    19             FCK.InsertHtml('{u_mergefield}');
    20             delete FCK;
    21             newwin=window.open('Selection.aspx',null,"left=300,top=100,height=200,width=200,status=yes,titlebar=no,toolbar=no,menubar=no,location=no");
    22             newwin.focus();
    23         }
     16function test - see attachment
     17 
     18Code on pop up window - see attachment
    2419
    25 Code on pop up window :
    26 <table style="font-family:Verdana; font-size:small">
    27 <tr><td>First Name </td><td> <input id="Radio1" type="radio" Value="{u_fname}" onclick="updateparent(this)" /></td></tr>
    28         <tr><td>Last Name </td><td> <input id="Radio2" type="radio" Value="{u_lname}" onclick="updateparent(this)" /></td></tr>
    29         <tr><td>Street </td><td> <input id="Radio3" type="radio" Value="{u_street}" onclick="updateparent(this)" /></td></tr>
    30         <tr><td>City </td><td> <input id="Radio4" type="radio" Value="{u_city}" onclick="updateparent(this)" /></td></tr>
    31         <tr><td>State </td><td> <input id="Radio5" type="radio" Value="{u_state}" onclick="updateparent(this)" /></td></tr>
    32         <tr><td>Zip </td><td> <input id="Radio6" type="radio" Value="{u_zip}" onclick="updateparent(this)" /></td></tr>
    33         <tr><td colspan="2"><input id="inpbtnFianl" type="button" value="Update" onclick="update();" /></td></tr>
    34 </table>
    35 
    36 function update()
    37         {
    38             var FCK = window.opener.FCKeditorAPI.GetInstance('ctl00_cph_FCKeditor1') ;
    39             var str = FCK.GetXHTML( true );
    40             if(document.getElementById('Radio1').checked)
    41             {
    42                 str=str.replace(/{u_mergefield}/g,"{u_fname}")
    43             }
    44             else if(document.getElementById('Radio2').checked)
    45             {
    46                 str=str.replace(/{u_mergefield}/g,"{u_lname}")
    47             }
    48             else if(document.getElementById('Radio3').checked)
    49             {
    50                 str=str.replace(/{u_mergefield}/g,"{u_street}")
    51             }
    52             else if(document.getElementById('Radio4').checked)
    53             {
    54                 str=str.replace(/{u_mergefield}/g,"{u_city}")
    55             }
    56             else if(document.getElementById('Radio5').checked)
    57             {
    58                 str=str.replace(/{u_mergefield}/g,"{u_state}")
    59             }
    60             else if(document.getElementById('Radio6').checked)
    61             {
    62                 str=str.replace(/{u_mergefield}/g,"{u_zip}")
    63             }
    64             else
    65             {
    66                 str=str.replace(/{u_mergefield}/g,"");
    67             }
    68             FCK.SetHTML(str);
    69             delete str;
    70             delete FCK;
    71             window.close();
    72             return(false);
    73         }
    74 
    75 function updateparent(radiobutton)
    76         {
    77             document.getElementById('Radio1').checked=false;
    78             document.getElementById('Radio2').checked=false;
    79             document.getElementById('Radio3').checked=false;
    80             document.getElementById('Radio4').checked=false;
    81             document.getElementById('Radio5').checked=false;
    82             document.getElementById('Radio6').checked=false;
    83             if(radiobutton.id=="Radio1")
    84             {
    85                 document.getElementById('Radio1').checked=true;
    86             }
    87             else if(radiobutton.id=="Radio2")
    88             {
    89                 document.getElementById('Radio2').checked=true;
    90             }
    91             else if(radiobutton.id=="Radio3")
    92             {
    93                 document.getElementById('Radio3').checked=true;
    94             }
    95             else if(radiobutton.id=="Radio4")
    96             {
    97                 document.getElementById('Radio4').checked=true;
    98             }
    99             else if(radiobutton.id=="Radio5")
    100             {
    101                 document.getElementById('Radio5').checked=true;
    102             }
    103             else if(radiobutton.id=="Radio6")
    104             {
    105                 document.getElementById('Radio6').checked=true;
    106             }
    107             return true;
    108         }
    109 
     20function update - see attachment
     21       
     22function updateparent(radiobutton) - see attachment
     23       
    11024----------------------------------------------------------------------------
    11125
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy