Forum
Topic RSS
20:07
23/05/2012
OfflineIf 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>
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66
Log In
Home