-
Keep Page Within <iFrame>
I recently embeded a phpbb forum into the discussion page of my site using iframes. When I sign in through the main "index.php" page everything works fine and stays within the iframe. But if I sign in through the "login.php" page, a seperate window opens for the forum. How can I keep the page within the iframe?
Reference: "http://www.nightclubindustry.com/discussions.html"
Thanks in advance.
-
-
You can't really force this. You could, I suppose, try to place some javascript on the page that would detect if it has a parent (a page holding it as an iframe), then see what this page was, guess as best it could if this is valid, and if not then redirect to the correct setup.... but that relies on Javascript, so it can be easily avoided by anyone who wants to, and is just a lot of extra work.
However, your question might be simpler-- how do you deal with just having it stay in the same window (frame) by default when clicking a link?
You'll need to find the target attribute (this exists for a form, a link, and even in Javascript activated links) and just change that to "_self". "_blank" is the setting for a new window, so looking for that might help you find the problem.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
DJR33
I was able to find the neccessary file and made the attribute change from "_top" to "_self" this was much easier than adding script.
Thanks
Last edited by nightclubindustry; 12-06-2007 at 10:59 PM.
-
-
Ok, great. I wasn't sure if you were asking to FORCE it stay within an iframe (hard, and needs complex scripting, as well as not secure), or just make it work by default. Glad it worked out.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
I had a similar problem but wasnt able to fix it this way because I have no control over the sites that load in my iFrame. So if you want to try another solution just in case yours has a problem check this out. And its cross browser safe. 
http://dhtmlnirvana.com/content/dhtm...fitiframe.html
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks