Re: Append an array once its loading a HTML page to RTE Content

  •  10-15-2015, 6:53 AM

    Re: Append an array once its loading a HTML page to RTE Content

    I'll explain from this start 

     

    I have following view initially

     

    Once I select check boxes from above view and click "Create Brochure" button I want to redirect and pass parameters to this create brochure Controller Actions (currently up to this section working) 

     

    according to the passing parameter values I  want to generate dynamic HTML content in RTE Editor

     

     for that I need to send those checked values as array to myhtml.html

     

    So I have to append that array once  myhtml.html  loading to RTE editor 

     

    If I pass thatose values to that .html I can hide or show those div sections . using jquery.

    for Ex: if I select first 3 check boxes. I can show first 3 div sections and rest of div sections, which are 4 to 10 hide

     

    that html will look like this

     

    1. <!DOCTYPE html>  
    2. <html>  
    3. <head>  
    4.     <title></title>  
    5.     <meta charset="utf-8" />  
    6.   
    7.     <script type="text/javascript">  
    8.   
    9.         $(document).ready(function () {  
    10.             
    11.             //using for loop read the array values index 0  to end:  
    12.               
    13.             for(i=0;i<array.length();i++){  
    14.               
    15.             if(array has value 1) $("#1").show()                  
    16.             else $(#1").hide();  
    17.   
    18.             if(array has value 2) $("#2").show()        
    19.             else $("#2").hide();  
    20.               
    21.             if(array has value 3) $("#3").show()  
    22.             else $("#3").hide();  
    23.   
    24.             .........  
    25.   
    26.             }  
    27.   
    28.   
    29.         });  
    30.               
    31.   
    32.     </script>  
    33. </head>  
    34. <body>  
    35.   
    36.   
    37.     <div id="1">  
    38.        ......  
    39.     </div>  
    40.   
    41.     <div id="2">  
    42.         ......  
    43.     </div>  
    44.   
    45.     <div id="3">  
    46.         ......  
    47.     </div>  
    48.   
    49.     <div id="4">  
    50.         ......  
    51.     </div>  
    52.   
    53.     <div id="5">  
    54.         ......  
    55.     </div>  
    56.   
    57.     <div id="6">  
    58.         ......  
    59.     </div>  
    60.   
    61.     ..........  
    62.   
    63. </body>  
    64. </html>  
     Appriciate If you can suggest to way to append that checked values to that html file

     

View Complete Thread