View Single Post
  #2 (permalink)  
Old 29th August 2009, 13:32
405hp's Avatar
405hp 405hp is offline
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,480
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

People have problems with that all the time.

IMO the best way is for you to be the master running the details.

Try this demo script and double click on something in the left grid

405hp.net/d4php/tutcompare.php (This was comparing 2 ajax methods for a speed test.)

Double click on left gets a new right, uses basicAjax.
The button does the same uses vcl xajax.

This is the code to make the button click happen. (it also requires a hidden field to hold the selection)
PHP Code:
               function BitBtn1JSClick($sender, $params)
               {

               ?>
               document.getElementById('HFpbSelect').value=dbgpbindex.getTableModel().getValue(2,dbgpbindex.getFocusedRow());
               dbgpricebook.setFocusedCell(0, 0, true);
               dbgpricebook.getSelectionModel().setSelectionInterval(0, 0);
               <?php
                
echo $this->$dbgpbindex->ajaxCall(ajaxIndexclicked,null,array("HFpbSelect","dbgpricebook"));

               }
               function 
ajaxIndexclicked($sender$params)
               {
                
$this->QPricebook->LimitStart=0;
                
$this->QPricebook->LimitCount=100;
                
$sql="SELECT `prod` , `unit` , `size` ,`brand` , `descr` ,  `serving` , `servsize` , `servunit` , `onhand` , `duedate`, `has_2ndlines`, `has_pic`   FROM products  WHERE  prod >=".$this->HFpbSelect->value;
                
$this->QPricebook->SQL=$sql;
                
$this->QPricebook->Refresh();
               }
Reply With Quote
Sponsored Links