Forum


04:32

Hello
I am newbie to JqGrid and... french. I've spent a lot of time reading topics but no answers for my problem;
I think it's quite simple but I really don't see how to solve it
In Php code each row has a link like :
$civnmpr = $row[CIVILITE]." <strong>" .htmlentities($row[NOM])."</strong> ".htmlentities($row[PRENOM]);
$civnmpr = "<a href='miniature.php?id=".$row[IDUSER]."' rel=\\"#overlay\\">".$civnmpr."</a>";
echo "<cell><![CDATA[".$civnmpr."]]></cell>";
and here my jqgrid param :
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#annuaire").jqGrid({
url:'example.php',
datatype: 'xml',
mtype: 'GET',
height: 400,
colNames:['Nom - Prenom', 'Tel.','Etg-Pièce','Fonctions','Affectation'],
colModel :[
{name:'nom', index:'NOM', width:185},
{name:'tel', index:'TEL', width:35, align:'right'},
{name:'piece', index:'PIECE', width:80, align:'right'},
{name:'fonction', index:'FONCTION', width:180, align:'right'},
{name:'bureau', index:'BUREAU', width:160, sortable:false} ],
pager: jQuery('#pager'),
rowNum:20,
rowList:[10,20,30],
sortname: 'NOM',
sortorder: "asc",
viewrecords: true,
imgpath: 'themes/basic/images',
caption: 'Annuaire da Cab',
gridComplete: function(){
$("a[rel]").overlay(function() {
var wrap = this.getContent().find("div.wrap");
wrap.load(this.getTrigger().attr("href"));
});
} /* End fonction*/
});
});
</script>
a piece of Html
<div style="overflow:hidden; margin:10px 5px;">
<table id="annuaire" class="scroll"></table>
<div id="pager" class="scroll" style="text-align:center;"></div>
</div>
<!-- Div pour les miniatures -->
<div class="overlay" id="overlay">
<!-- the external content is loaded inside this tag -->
<div class="wrap"></div>
</div>
function in Gridcomplete display a modal box (a Jquery tool from flowplayer.org/tools/demos/overlay/external.html)
All of this works fine when loading (the modal box appears correctly) the first time but no on paging or sorting. It display the right link but not in a modal box as it's suppose to do.
Could u please show me, just once.
I'll be vrey greatful for ur help
Sam
09:15

Moderators
30/10/2007

Hello,
Could you please first try with
gridComplete: function(){
alert("GridComplete");
}
If this works for every request, then maybe the problem is here
$(”a[rel]“).overlay(function() { var wrap = this.getContent().find(”div.wrap”); wrap.load(this.getTrigger().attr(”href”)); });
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
04:10

Hi Tomy
First, many thanks for ur answer.
I try as u said : works all time
I also try
gridComplete: function(){
$(”a[rel]“).overlay(function() {
alert("Ok"); displayed but only on 1st page when loading
var wrap = this.getContent().find(”div.wrap”);
wrap.load(this.getTrigger().attr(”href”));
});
} /* End fonction*/
It seems that the function is not loaded anymore after paging or sorting, so I'll have to find a way reload it.
Can u help me twice. Iam completly lost
Thanks again
Sam
12:15

Moderators
30/10/2007

Hello,
What is the purpose of the overlay plugin. Check the value of wrap? What you want to get?
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
18:34

Hi,
the this variable is a pointer to the Overlay API, so "var wrap" is an object.http://flowplayer.org/tools/ov.....y.html#api.
It's simply open a modal box with external file content.
My purpose is to show when click on each link (row) inside the grid, a few detail coming from the miniature.php file.
That's all. I wonder what's wrong .Tell me if I'd better give up and found another jquery modal box
Thanks again Tony, really
Sam
04:47

Moderators
30/10/2007

Hello,
could you please set the parameter
viewrecords: false,
and test. Please let me known if this work.
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
55 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