Wondering if this will always be free?  See why free is better.

Main Menu

Iframe Question

Started by FrizzleFried, April 07, 2022, 08:38:05 AM

Previous topic - Next topic


NOTE: I really have no idea what I am doing.  I am barely a hack trying to get things that I want accomplished my learning on the fly and asking questions as I go.  Expect me to know very little so please ... keep that in mind when replying.  I'm not even a novice...

Now to the question..

echo '<a href="' . $scripturl . '?action=ratings;sa=seeratings;msgid=' . $message['id'] . '" onclick="return reqWin(this.href, 600, 400, false);">' . '&nbsp;<img src="">' . '</a><br><br>';

Ok.  This code opens a "VIEW ALL RATINGS" pop-up.

I would much prefer this open up as a "frame" within the page... then be able to close" also within the page.  Ideally...once I can get the page to appear in a frame,  I would like to add some effects like a sliding open/close, etc... but just getting the darned thing to appear is my first step.

I do believe this is called an "iframe".   I'm also OK with this data appearing as a "hover" effect over that same ICON if it's easier.

Can someone give me an idea how how to change this from opening a pop up window (separate from main page) to an iframe,  other other such method of creating this frame within the page at click?



iframes are old tech and are generally not used much anymore.

However, what you describe is a modal box, not an iframe.
The problem with modals is that they have to be loaded at the same time that the page itself is loaded (the CODE is loaded but the visual is inactive until you do something). This means that the content loaded in the modal generally needs to be retrieved (and available) at page load.

Opening a pop-up is less code intensive and does not require it's content to be available until triggered.

in short, you're asking for something that may negatively impact your system.

You'd have to ask the author of the reactions mod for more details

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Diego Andrés

Kindred, the phrasing is a bit off but he's asking for that (the modal type of functionality).

Ideally, it needs just a few tweaks in the source file using $context['from_ajax'] = true;
Then, using the expected syntax for the sub-template, and replacing reqWin with reqOverlayDiv

SMF Tricks - Free & Premium Responsive Themes for SMF.