![]() |
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:
|
Have you played with the IFrame class/object? It may do the trick.
|
Mmm, I tried that, but I don't think I'm using it correctly since it always returns "this is the Iframe class" instead of an iframe... this is used to build an iframe right?
I tried changing the code to this: PHP Code:
The link target is invalid... I also tried this and go the same message: PHP Code:
|
Am I using the target function correctly on the second code? I have no clue... XP
|
What you want to do is direct each adoptable link to the same Iframe, not create an Iframe for each adoptable.
Inside the for cycle, you just need to add that target to the link, and don't forget to put a / before levelup ( like /levelup/click/{$adopt->getAdoptID()) Outside the cycle, for example, you add the iframe, it can have an empty source $document->add($daycareTable); $document->add(new Comment("<iframe name='iframe' src=''></iframe>")); |
Re
Thank you! Actually, my problem is targetting... I don't know how to set the target to the iframe, the page gives me and error...
|
Setting the target to the iframe is putting a target='iframe_name' in your links. Does the setTarget you use exist? Since this is 1.3.3 I can't really test it x.x But in 1.3.4, instead of using the Link object I used HTML in a Comment object. Not sure if this would work in 1.3.3
PHP Code:
|
I actually tried something similar, but the page would break before. XP
Now, the page shows up with this message: Welcome to Daycare Center, here you can help with the growth of these cute baby adoptables. Fatal Error: Class ArrayList either does not exist, or has its include path misconfigured! |
Is there such a function in v.1.3.3? Would you mind telling me where to find it to check if it's there?(class page) :3
|
Probably ArrayLists don't exist in that version. Maybe turning the image variable into a Comment object (similar to the Comment I use in my code) instead of a Link object?
|
I see... I tried, but the page breaks. :L Umm, do you know what arraylists do?
|
Is there an alternative to using an arraylist? That needs to be there right? Umm... do you think it would be possible to add the code to v.1.3.3?
|
All times are GMT -5. The time now is 04:07 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.