0
<script>
  $(function(){
        $.ajax({
            method:"POST",
            url:"../public/offerall.php"

        });

        $.post("../public/offerall.php",function(data){

            var eventList = JSON.parse(data);
            $('#special').html({

                source:eventList,
                select: function(event, ui){
                    $("#contentHeader").text(ui.item.label);
                    $("#contentParagraph").text(ui.item.eDescription);
                    $("#contentVenue").text(ui.item.vName);
                    $("#contentCategory").text(ui.item.cDesc);
                    $("#contentStartDate").text(ui.item.sDate);
                    $("#contentEndDate").text(ui.item.eDate);
                    $("#contentPrice").text(ui.item.ePrice);
                }

            });


        });

 });

this is how i used to call the arraylist and to display in website

<div class="special"><ul class="rig"><li><h2 id="contentHeader"></h2>
    <h3 id="contentVenue"></h3>
    <h4 id="contentCategory"></h4>
    <h4 id="contentStartDate"></h4>
    <h4 id="contentEndDate"></h4>
    <p id="contentParagraph"></p>
    <h4 id="contentPrice"></h4></li></ul></div>

there no error display in developer tools but the data won't display Can any one help me? i already insert the JavaScript library

  • Thanks alot .. but still no show up the data – mohd fadzil Apr 19 '17 at 10:12
  • What does the Network tab of the developer tools show? Does the query go out? Does the response arrive? Does it contain what you want it to contain? – SF. Apr 19 '17 at 11:02
  • the developer tools show no error. the query i used in other page to call all the data which is working fine. but i can't seen to display all the data using this method – mohd fadzil Apr 20 '17 at 16:41

0 Answers0