View Single Post
  #1  
Old 06-17-2014, 09:16 PM
Hwona's Avatar
Hwona Hwona is offline
Member
 
Join Date: Mar 2013
Posts: 620
Gender: Female
Credits: 66,541
Hwona is on a distinguished road
Default Making Link Pop up in Iframe?

Hello everyone, I've been trying to get the links of daycare pets to pop up in an iframe on the page when clicked, but I can't seem to find a way to link the php link to a target and when I try to use a html like and replace the id with a variable, the page pops up blank.
Here's the code for the daycare function(v.1.3.3):
PHP Code:
    public function daycare(){
        
$mysidia Registry::get("mysidia");
        
$document $mysidia->frame->getDocument();
        
$document->setTitle($mysidia->lang->daycare_title);
        
$document->addLangvar($mysidia->lang->daycareTRUE);
        
        try{
            
$daycare = new Daycare;
            
$adopts $daycare->getAdopts();
        }
        catch(
DaycareException $dae){
            
$message $dae->getmessage();
            
$document->addLangvar($mysidia->lang->{$message});
            return;
        }
        
        
$daycareTable = new Table("daycare"""FALSE);
        
$daycareTable->setBordered(FALSE);
        
$total $daycare->getTotalAdopts();
        
$index 0;

        for(
$row 0$row $daycare->getTotalRows(); $row++){
            
$daycareRow = new TRow("row{$row}");
            for(
$column 0$column $daycare->getTotalColumns(); $column++){
                
$adopt = new OwnedAdoptable($adopts[$index]);
             
$image = new Link("levelup/click/{$adopt->getAdoptID()}"$adopt->getImage("gui"), TRUE);
                
$stats = new Comment($daycare->getStats($adopt));
                
$daycareCell = new TCell(new ArrayObject(array($image)), "cell{$index}");
                
$message1 "<iframe name='iframe1' src='levelup/click/{$adopt->getAdoptID()}'></iframe>";
                
$daycareCell->setAlign(new Align("center""center"));
                
$daycareRow->add($daycareCell);
                
$index++;
                if(
$index == $total) break;
            }
            
$daycareTable->add($daycareRow);            
        }
        
        
$document->add($daycareTable);
        
$document->addLangvar($message1);
        if(
$pagination $daycare->getPagination()) $document->addLangvar($pagination->showPage());
    }

Thanks! :D
__________________
Reply With Quote