Thulasiram pakala

Thulasiram pakala

  • 913
  • 872
  • 115.9k

HTML Data COnvert Base64

Jun 2 2023 6:57 AM
<script type="text/javascript">
        $(function () {
            $("#btnSubmit").click(function () {
                var divContents = $("#Grid").html();
                //var encodedStr = Base64.encode(divContents)
                //var encodedData = window.btoa(divContents);
              
                // var encdata = encode64(divContents);
                var JsonModel = '@Html.Raw(Json.Encode(@Model))';
                alert(divContents);
                var data = JSON.encode64(divContents.trim().toString());
             
                
                //alert(data);
               // var htmldata = document.getElementById("divhtml").innerHTML;
               
                $.ajax({
                    
                    type: 'POST',
                    url: "/PreviewForm4/ExportExcel",
                    data: '{exportdata: "' + data + '"}',
                    contentType: "application/json; charset=utf-8",
                    dataType: "html",
                   
                     success: function (response) {
                         
                    },
                    failure: function (response) {
                        alert(response.responseText);
                    },
                    error: function (response) {
                        alert(response.responseText);
                    }
                });
            });
        });

    </script>


<b>
</b>
<p></p>

<br>
<p>
    <b>
        (Note :- Every column appearing in the form has to be filled in words not by dashes and dots)
        <br>
    </b>
</p>
<table style="border: 1px solid #dee2e6;color:#212529;font-size: 12pt; width:100%;border-color: grey;text-indent: initial;text-align:center;" cellspacing="0" cellpadding="3">
    <tbody><tr>
        <th style="width:250px;border: 1px solid #ccc;padding: 0.75rem; font-weight:100px;">1. The permanent address(with Telephone no and Mobile no. if any) of the public servant</th>
        <td style="width:70px;border: 1px solid #ccc;padding: 0.75rem; ">
            7 th, Shivaji Nagar, ???????? ??????
            ,BENGALURU,  630047<br> Landline: 040-4232324
            <br>Mobile Number:7411211953

        </td>
    </tr>
    <tr>
        <th style="width:150px;border: 1px solid #ccc;padding: 0.75rem;">2. Names of the members of the Family of the public  servant  and his relationship with each of them (Reg. 'Family', see explanation to section 22 of the Lokayukta Act)</th>
        <td style="width:70px;border: 1px solid #ccc;padding: 0.75rem; ">
            <table style="width:70%; padding: 0.75rem; margin-left:auto;margin-right:auto;">
                <tbody><tr>
                    <th style="padding: 0.75rem;text-align:center;  vertical-align: top;">
                        Public Servant
                    </th>
                    <th style="padding: 0.75rem;text-align:center;  vertical-align: top;">
                        Relationship
                    </th>

                </tr>
                    <tr>

                        <td style="width:100px;text-align:center;">
                            Pakala Thulasi Ram
                        </td>
                        <td style="width:100px;text-align:center;">
                            Self
                        </td>

                    </tr>
                    <tr>

                        <td style="width:100px;text-align:center;">
                            Prameela
                        </td>
                        <td style="width:100px;text-align:center;">
                            Wife
                        </td>

                    </tr>
                    <tr>

                        <td style="width:100px;text-align:center;">
                            Bhavitha
                        </td>
                        <td style="width:100px;text-align:center;">
                            Daughter
                        </td>

                    </tr>
                    <tr>

                        <td style="width:100px;text-align:center;">
                            PSC
                        </td>
                        <td style="width:100px;text-align:center;">
                            Father
                        </td>

                    </tr>
                    <tr>

                        <td style="width:100px;text-align:center;">
                            AM
                        </td>
                        <td style="width:100px;text-align:center;">
                            Mother
                        </td>

                    </tr>


            </tbody></table>

        </td>
    </tr>
    <tr>
        <th style="width:150px;border: 1px solid #ccc;padding: 0.75rem;">3. Present annual income of the public servant and each one of the family members</th>
        <td style="width:70px;border: 1px solid #ccc;padding: 0.75rem; ">
            <table style="width:70%; padding: 0.75rem; margin-left:auto;margin-right:auto;">
                <tbody><tr>
                    <th style="padding: 0.75rem;text-align:center;  vertical-align: top;">
                        Public Servant
                    </th>
                    <th style="padding: 0.75rem;text-align:center;  vertical-align: top;">
                        Relationship
                    </th>
                    <th style="padding: 0.75rem;text-align:center;  vertical-align: top;">
                        Annual Income (in Rupees)
                    </th>


                </tr>
                    <tr>

                        <td style="width:100px;text-align:center;">
                            Pakala Thulasi Ram
                        </td>
                        <td style="width:100px;text-align:center;">
                            Self
                        </td>
                        <td style="width:100px;text-align:center;">
                            400000.00
                        </td>
                    </tr>
                    <tr>

                        <td style="width:100px;text-align:center;">
                            Prameela
                        </td>
                        <td style="width:100px;text-align:center;">
                            Wife
                        </td>
                        <td style="width:100px;text-align:center;">
                            300000.00
                        </td>
                    </tr>
                    <tr>

                        <td style="width:100px;text-align:center;">
                            Bhavitha
                        </td>
                        <td style="width:100px;text-align:center;">
                            Daughter
                        </td>
                        <td style="width:100px;text-align:center;">
                            0.00
                        </td>
                    </tr>
                    <tr>

                        <td style="width:100px;text-align:center;">
                            PSC
                        </td>
                        <td style="width:100px;text-align:center;">
                            Father
                        </td>
                        <td style="width:100px;text-align:center;">
                            600000.00
                        </td>
                    </tr>
                    <tr>

                        <td style="width:100px;text-align:center;">
                            AM
                        </td>
                        <td style="width:100px;text-align:center;">

 


Answers (2)