Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






calling a jqgrid via ajax

No Tags
UserPost

20:07
23/05/2012


dancombs

North Brookfield, MA

Member

posts 3

If I include this in a php file, it works nicely.

<body>
<?php include "myfirstgrid.php" ?>
</body>
</html>

I want to use a select box to choose an item from a list then call the jqgrid php file "myfirstgrid.php". The select works perfectly, calling "squdrons.php" and populating the select list. When the select chooses an item (which works) I want to fill "#bot" with the jqgrid (which doesn't work). The reason for the select list is I want to modify what "myfirstgrid.php" sends back from the server based on the selection.  This is what I currently have which doesn't populate "#bot" with the jqgrid.

<body>
      <select size="1″ id="squadronList">
        <option>Select a Navy squadron</option>
          <?php include "squadrons.php" ?>
      </select>
<div id="top"></div>
<div id="bot"></div>
  <script type="text/javascript">
    $("select").change(function () {
          var str = "";
          $("select option:selected").each(function () {
                str = $(this).val();
                $("#top").text(str); // this works
              });
        })
        .change();
  </script>
<script>
$("#squadronList").bind("change", function() {
  var uic = $("#squadronList").val();
  $("#bot").text(function() {
      $.get("myfirstgrid.php");
      });
});

</script>

No Tags

About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

157


Currently Online:

25 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 9596

Posts: 28792

Membership:

There are 10193 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1157

markw65 – 179

kobruleht – 144

phicarre – 126

YamilBracho – 124

Renso – 118

Administrators: admin (56 Posts)

Moderators: tony (7010 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information