Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End echo html code in JSON

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #153870
    Rohithzr
    Participant

    [SOLVED]
    it is a server-side datatable.js. which is getting it’s data through a php file echoing json.

    now in the final table i want to show an html list made from the code: <ul class = "tools"><li>ssss</li> </ul>

    in my data file (that is echoing JSON)

    $tools = '&ltul class="dropdown-menu pull-right"&gt
    &ltli>&lta href="#"&gtlti class="icon-info-sign"&gt&lt/i&gtDetails/a&gt&lt/li&gt
    &lt/ul&gt';
    $row[] = $tools;
    

    and also tried this

    $tools = '<ul class="dropdown-menu pull-right">
    <li><a href="#"><i class="icon-info-sign"></i>Details</a></li>
    <li><a href="#"><i class="icon-edit"></i> Edit</a></li>
    <li><a href="#"><i class="icon-trash"></i> Delete</a></li>
    </ul>';
    $row[] = $tools;
    

    in the first i get nice JSON but then the table does not convert it to HTML in the second i dont get good JSON it displays html there itself

    #153890
    __
    Participant

    [SOLVED]
    it is a server-side datatable.js. which is getting it’s data through a php file echoing json.

    did you solve your problem?

    if not, then you’ll need to explain how you’re encoding this, how you’re outputting it, and how your javascript handles it.

    #154212
    Rohithzr
    Participant

    [SOLVED] it is a server-side datatable.js. which is getting it’s data through a php file echoing json.

    did you solve your problem? if not, then you’ll need to explain how you’re encoding this, how you’re outputting it, and how your javascript handles it.

    well sorry for the late reply, actually i could not find (mark as solved) so i wrote solved…

    This problem solved facing another one now… in another post

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.