| Index
» Projekty
» phpMyEdit
» Fórum
» No checked radio button by default |
 |
tszabo
Založený: 07.11.2006
Príspevky: 4
Zaslal: 2006-11-22 16:10
Návrat hore
Odpovedať s citátom
|
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
Založený: 09.10.2007
Príspevky: 1
Zaslal: 2007-10-09 05:56
Návrat hore
Odpovedať s citátom
|
//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;
}
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|