Jump to content

Recommended Posts

I have an administration panel coded by the wonderful Adrian, only, when it redirects to another location, it only redirects the right frame! I have tried using header location, window.location, document.location. No matter what it will always redirect the main frame there, and leave the left frame! Can anyone help? I don't think this requires you to see the frame script, but if you think it would help, ask and I will show it.

- Dan
Link to comment
https://forums.phpfreaks.com/topic/17354-frames-and-redirecting-no/
Share on other sites

That is really gonna take a lot of coding if it is because of the 1st condition.

Its important to see the right frames name, you dint specify it so you look for its name <frame name="x"> So I am rightnow considering it x

[b]1. Checking how its done[/b]

[b]Condition #1[/b]
Does the panel have a line like <base target="x"> then you need to code a lot.
Remove the line. And put [code]target="x"[/code] in every <a> tag. Goto step 2.

[b]Condition #2[/b]
In case it is coded with all its links with [code]target="x"[/code] you goto the next step

[b]2. Changing[/b]
Now its quite easy just remove the line [code]target="x"[/code] from the links you dont want to open in the right frame
[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="../templates/default/default.css" rel="stylesheet" type="text/css" />
</head>

<frameset rows="*" cols="212,*" framespacing="1" frameborder="no" border="1">
  <frame src="menu.php" name="leftFrame" scrolling="auto" noresize="noresize" id="leftFrame" title="leftFrame" />
  <frame src="main.php" name="mainFrame" scrolling="auto" id="mainFrame" title="main" />
</frameset>
<noframes><body>
</body>
</noframes></html>
[/code]

In every link I have, its just a href=link, no target. but if i load the admin index in mainFrame, then I have two leftframes!!!
mainframe:
[code]
</td>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="../templates/default/default.css" rel="stylesheet" type="text/css" />
</head>
      <td width="1%">&nbsp;</td>
      <td width="82%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="15" height="26" ><img src="../templates/default/images/left.jpg" width="15" height="26" /></td>
          <td height="26" class="catgb"><span class="catname">&nbsp;&nbsp;Welcome to your Admin Panel </span></td>
          <td width="15" height="26"><img src="../templates/default/images/right.jpg" width="15" height="26" /></td>
        </tr>
      </table>
        <table width="100%" border="0" cellpadding="7" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#BCBCBC" class="cattable">
          <tr>
            <td width="5%" bordercolor="#BCBCBC" bgcolor="#FFFFFF"><div align="left">
              <p>Welcome to the administration panel {USERNAME},</p>
              <p>&nbsp;</p>
              <p>Here you can configure your forum, members, see statistics, and much more! </p>
              <p>&nbsp;</p>
 
            <table width="100%" border="0" class="maintext">
  <tr>
    <td width="25%" bordercolor="#BCBCBC" bgcolor="#FFFFFF">Total Members: </td>
    <td width="25%" bordercolor="#BCBCBC" bgcolor="#FCFCFC">{MEMBER_COUNT}</td>
<td bordercolor="#BCBCBC" bgcolor="#FFFFFF">Total Accounts Unconfirmed:</td>
<td width="25%" bordercolor="#BCBCBC" bgcolor="#FCFCFC">{ACCOUNT_UNCONFIRMED}</td>
  </tr>
  <tr>
    <td bordercolor="#BCBCBC" bgcolor="#FFFFFF">Total Threads: </td>
    <td bordercolor="#BCBCBC" bgcolor="#FCFCFC">{THREAD_COUNT}</td>
<td bordercolor="#BCBCBC" bgcolor="#FFFFFF">Users celebrating their birthday today:</td>
<td bordercolor="#BCBCBC" bgcolor="#FCFCFC">{BDAY_COUNT}</td>
  </tr>
  <tr>
    <td bordercolor="#BCBCBC" bgcolor="#FFFFFF">Total Posts: </td>
    <td bordercolor="#BCBCBC" bgcolor="#FCFCFC">{POST_COUNT}</td>
<td width="25%" bordercolor="#BCBCBC" bgcolor="#FFFFFF">Total Banned Users:</td>
<td bordercolor="#BCBCBC" bgcolor="#FCFCFC">{BANNED_COUNT}</td>
  </tr>
  <tr>
    <td bordercolor="#BCBCBC" bgcolor="#FFFFFF">.Omega BB Version: </td>
    <td bordercolor="#BCBCBC" bgcolor="#FCFCFC">.Omega BB Beta 1 </td>
<td bordercolor="#BCBCBC" bgcolor="#FFFFFF">Latest Version:</td>
<td bordercolor="#BCBCBC" bgcolor="#FCFCFC">Yes</td>
  </tr>
  <tr>
    <td bordercolor="#BCBCBC" bgcolor="#FFFFFF">PHP Version: </td>
    <td bordercolor="#BCBCBC" bgcolor="#FCFCFC">{PHP_VERSION}</td>
<td bordercolor="#BCBCBC" bgcolor="#FFFFFF">How many new members today:</td>
<td bordercolor="#BCBCBC" bgcolor="#FCFCFC">{MEMBERS_TODAY}</td>
  </tr>
  <tr>
    <td bordercolor="#BCBCBC" bgcolor="#FFFFFF">MySQL Version: </td>
    <td bordercolor="#BCBCBC" bgcolor="#FCFCFC">{MYSQL_VERSION}</td>
  </tr>
</table>
              </div></td>
          </tr>
        </table>
        <br />
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="15" height="26"><img src="../templates/default/images/left.jpg" width="15" height="26" /></td>
            <td height="26" class="catgb"><span class="catname">&nbsp;&nbsp;Admin Notes </span></td>
            <td width="15" height="26"><img src="../templates/default/images/right.jpg" width="15" height="26" /></td>
          </tr>
        </table>       
        <table width="100%" border="0" cellpadding="4" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#BCBCBC" class="cattable">
          <tr>
            <td width="5%" bordercolor="#BCBCBC" bgcolor="#FFFFFF"><div align="left">
                <p>Here you can store Admin Notes for yourself and other admins.</p>
                <p>
<center>
  <form action="{FORMACTION}" method="POST">
                  <textarea name="admin_notes" cols="120" rows="5">{ADMIN_NOTES}</textarea>
                  <br />
                  <input type="submit" name="submit" value="Save" />
  </form>
</center>
                </p>
            </div></td>
          </tr>
        </table>        <p>&nbsp;</p></td>
      </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      </tr>
    <tr>
      <td colspan="3"><div class="footer"><div align="center">Powered by <a href="http://dotomega.com">dotOmega</a><br>
    Copyright © 2006 <a href="http://dotomega.com">dotOmega Group</a></div></div></td>
      </tr>
  </table>
</p>
</body>
</html>
[/code]

leftframe:
[code]
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="../templates/default/default.css" rel="stylesheet" type="text/css" />
</head>
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="17%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="15" height="26"><img src="../templates/default/images/left.jpg" width="15" height="26" /></td>
                <td height="26" class="catgb"><span class="catname">&nbsp;&nbsp;<a href='' class='headings'>Board Settings</a></span></td>
                <td width="15" height="26"><img src="../templates/default/images/right.jpg" width="15" height="26" /></td>
              </tr>
            </table>
              <table width="100%" border="0" cellpadding="4" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#BCBCBC" class="cattable">
                <tr>
                  <td width="5%" bordercolor="#BCBCBC" bgcolor="#FFFFFF"><div align="left"><a href=''>Change and Configure</a></img> </div></td>
                </tr>
              </table>
              <br />
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="15" height="26"><img src="../templates/default/images/left.jpg" width="15" height="26" /></td>
                  <td height="26" class="catgb"><span class="catname">&nbsp;&nbsp;<a href='' class='headings'>Forum Settings</a></span></td>
                  <td width="15" height="26"><img src="../templates/default/images/right.jpg" width="15" height="26" /></td>
                </tr>
              </table>
              <table width="100%" border="0" cellpadding="4" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#BCBCBC" class="cattable">
                <tr>
                  <td width="5%" bordercolor="#BCBCBC" bgcolor="#FFFFFF"><div align="left"><a href=''>Create new forum</a> <br />
                          <a href=''>Manage Forums</a> <br />
                      <a href=''>Forum Permissions</a></div></td>
                </tr>
              </table>
              <br />
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="15" height="26"><img src="../templates/default/images/left.jpg" width="15" height="26" /></td>
                  <td height="26" class="catgb"><span class="catname">&nbsp;&nbsp;<a href='' class='headings'>Member Control</a></span></td>
                  <td width="15" height="26"><img src="../templates/default/images/right.jpg" width="15" height="26" /></td>
                </tr>
              </table>
              <table width="100%" border="0" cellpadding="4" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#BCBCBC" class="cattable">
                <tr>
                  <td width="5%" bordercolor="#BCBCBC" bgcolor="#FFFFFF">
  <div align="left">
  <a href=''>Edit user </a> <br />
                <a href=''>Find user</a> <br />
                    <a href=''>Delete user</a><br />
                      <a href=''>Ban user</a>
                  </div>
  </td>
                </tr>
              </table>              <p>&nbsp;</p></td>
          </tr>
        </table>
[/code]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.