LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-16-2008, 12:52 PM   #1
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,077

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
force iframe content to remain in iframe?


i have a web script (phpmyadmin) embeded in an iframe on a page, however whenever phpmyadmin refreshes to the login page it takes over the whole page and doesnt return to the iframe, how do i fix it so that it is always forced into the iframe instead?
 
Old 09-17-2008, 06:29 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,116

Rep: Reputation: 218Reputation: 218Reputation: 218
Hi

I think you need to modify phpmyadmin. It's intentionally coded like this.

Look in the file "libraries/auth/cookie.auth.lib.php"

Code:
<script type="text/javascript" language="javascript">
//<![CDATA[
// show login form in top frame
if (top != self) {
    window.top.location.href=location;
}
//]]>
</script>
Probably it's because it uses frames itself, and without this, the login form would come in the left/right frames of phpmyadmin.

If your iframe has a name, I think something like this would work:

if (top.frames.iframename != self) {
top.frames.iframename.location.href=location;
}

Never tested it, so I don't know if it works though.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Force /dev/sdX? to remain? tbeehler Linux - Software 2 05-08-2008 04:29 PM
embed table from nagios status page on differnet webpage with maybe iframe? sinbsd Programming 0 05-08-2008 12:57 PM
Problem with iframe in Mozilla and Firefox ! Balakrishnan84 Programming 4 08-05-2007 11:22 PM
iframe woes ScottReed Programming 0 07-26-2007 11:04 AM
javascript - submit an iframe form AM1SHFURN1TURE Programming 1 09-23-2006 05:51 PM


All times are GMT -5. The time now is 06:29 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration