Sorry to keep replying to myself. Just wanted to let you know my progress. After stepping back and evaluating the case I managed to configure it as I wanted.
## View jQuery(document).ready(function(){jQuery("#%(id)s").jqGrid({ onSelectRow: function(postdata){$("#myframe").attr('src',"/MyApp/ default/details/"+(postdata));} }); ## Controller def details(): id = request.args[0] // everything else return dict() Jay On May 14, 5:58 pm, Jason Lotz <jayl...@gmail.com> wrote: > The first and obvious thing I see I did wrong was trying to put python > into jquery script. > > jQuery("#%(id)s").jqGrid({ onSelectRow: function() { > $ > ('#myframe').attr('src',"{{=URL(r=request,f='details',args=2)}}");} > > But I still don't understand how I can make it dynamic src, or how to > get jquery to communicate with the server. > > Jay > > On May 14, 4:59 pm, Jason Lotz <jayl...@gmail.com> wrote: > > > > > Now I have two containers, one includes jqgrid_plugin the other > > includes iframe to display /default/details view. Both work fine on > > the initial load of the page. Using jqgrid onSelectRow event I tried > > to add a function to update the iframe page. > > > ## View > > <div> > > {{=plugin_jqgrid(db.test,columns=['fields'],height=200)}} > > </div> > > <div> > > <iframe id="myframe" src="{{=URL(r=request,f='details',args=2)}}"></ > > iframe> > > </div> > > > ## model > > jQuery(document).ready(function(){ > > jQuery("#%(id)s").jqGrid({ onSelectRow: function() {$ > > ('#myframe').attr('src',"{{=URL(r=request,f='details',args=2)}}");} > > > }); > > > However when a row is selected the iframe returns Invalid Request. > > It's not even calling the controller, just displays Invalid Request. I > > haven't quite figured out how to get jqgrid and the server > > communicating. I've been able to show grid values using alert and get > > jquery to handle data sent from server but can't get jqgrid to trigger > > the server and the server read jqgrid.Parameters. > > > Any suggestions as to the best way to update iframe contents by > > selecting a row? And/Or someone kindly provide some sort of > > explanation how jquery and server communicate would be greatly > > appreciated !!.. > > > Jay