Forum

July 12th, 2025
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
calling a jqgrid via ajax
23/05/2012
20:07
Avatar
dancombs
North Brookfield, MA
Member
Members
Forum Posts: 3
Member Since:
23/05/2012
sp_UserOfflineSmall Offline

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>

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

Currently Online:
19 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information