Index
» Projects
» phpMyEdit
» Forum
» No checked radio button by default |
|
tszabo
Joined: 07 Nov 2006
Posts: 4
Posted: 2006-11-22 16:10
Back to top
Reply with quote
|
Having a larger table, which can not be displayed in a single page at a given $opts['inc'] setup and navigating by ">", "<" or "goto" buttons on every second page have no checked radio button (record selected) by default.
Let's say on every even page the first row is checked by default but on the odd pages all radio buttons are unchecked.
When I have no selected record there will be no "PME_sys_rec" value set in form and going to eg. View mode results in an empty page.
Is it a (known) bug or I misconfigued something?
Thanks for any help!
|
bipin
Joined: 09 Oct 2007
Posts: 1
Posted: 2007-10-09 05:56
Back to top
Reply with quote
|
//replace the case "if ($this->nav_buttons())" with following one it might help some thing as it selects random rows while page navigation but selects correct one in viewing,changing etc hope this helps some what
$i=0;
$j1=1;
if ($this->nav_buttons()) {
//echo "key_rec ".$key_rec;
//echo "this->rec ".$this->rec;
global $i;
if($i==0)
{
if($this->rec=="0")
{
//echo "first".
$first=$key_rec;
$this->rec='';
$i=1;
}
elseif($this->rec>$key_rec)
{
//echo "key_rec ".$key_rec;
//echo "this->rec ".$this->rec;
global $j1;
$x=$this->inc;
if($j1<$x)
{
$j1+=1;
if($this->rec==$key_rec)
{ $this->rec=$key_rec;
$i++;}
}
else
{
$first=$key_rec;
$this->rec='';
$i++;
}
}
elseif($this->rec<$key_rec)
{
$first=$key_rec;
$this->rec='';
$i=1;
}
elseif($this->rec==$key_rec)
{
$this->rec=$key_rec;
$i++;}
}
$a='<td class="'.$css_class_name.'"><input class="'.$css_class_name;
$a.='" type="radio" name="'.$this->cgi['prefix']['sys'].'rec';
$a.='" value="'.htmlspecialchars($key_rec).'"';
if (($this->rec == '' && $first) || ($this->rec == $key_rec)) {
$a.=' checked="checked"';
//new dBug($this->rec);
$first = false;
}
$a.=' /></td>'."\n";
echo $a;
}
|
Post new topic
Reply to topic
|
|
|
|