Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
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:
|
#2
|
||||
|
||||
Have you played with the IFrame class/object? It may do the trick.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#3
|
||||
|
||||
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:
Last edited by Hwona; 06-18-2014 at 11:30 AM. |
#4
|
||||
|
||||
Am I using the target function correctly on the second code? I have no clue... XP
|
#5
|
||||
|
||||
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>"));
__________________
asp.net stole my soul. |
#6
|
||||
|
||||
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...
|
#7
|
||||
|
||||
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:
__________________
asp.net stole my soul. |
#8
|
||||
|
||||
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! |
#9
|
||||
|
||||
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
|
#10
|
||||
|
||||
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?
__________________
asp.net stole my soul. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Link Dots | voni | Questions and Supports | 6 | 05-13-2014 10:20 AM |
Link | MaximumRide | Questions and Supports | 6 | 04-23-2012 04:52 PM |
how change this link ? :( | kratosvr | Questions and Supports | 5 | 08-24-2011 09:09 AM |
PHP in a link? | Saphira | Questions and Supports | 9 | 01-31-2009 11:30 AM |
Forums Link | Ashje | Questions and Supports | 2 | 01-24-2009 12:28 AM |
What's New? |
What's Hot? |
What's Popular? |