Jump to content

[SOLVED] Closing a Frameset


gevensen

Recommended Posts

Hopefully a simple question

How can I take a page that has frames and collapse or close them without clsoing the browser window

IOW

I am using a frame

i have an expense image on the left and a voucher on the right

when the voucher saves successfully it redirects to the index but the frame for the image is still open

 

for example:

 

<FRAMESET COLS="800,*" FRAMEBORDER=0 FRAMESPACING=0 BORDER=0>
<?php //echo "trying to call ".$expenseimage1."<br />";?>
  <!-- left frame  which is the image frame-->
   <FRAME SRC="expense_image1.php" NAME=ExpenseImage>

  <!-- right frame is another frameset -->
  <!-- rows for horizontal divisions -->
  <FRAMESET ROWS="1200,*">

    <!-- top frame -->
<!--    <FRAME SRC="titlebar.html" NAME=titlebar SCROLLING=NO> -->
<?php echo "trying to call ".$expenseimage2."<br />";?>
    <!-- bottom frame -->
    <FRAME SRC="expense_image_2.php" NAME=Expense>
  </FRAMESET>

Link to comment
Share on other sites

how is PHP calling it? with a header('Location: ...') redirect?

let me rephrase

the previous page calls a header redirect then the filenames are in <FRAME SRC="expense_image_2.php" NAME=Expense>

and <FRAME SRC="expense_image_1.php" NAME=Image>

this calls the 2 files into the frames (of course the code is not next to each other see the 1st post for the location

any other data is passed via session to the 2 pages called where it loads the info in seperate frames

Link to comment
Share on other sites

i found an answer on the page its going to insert this java code  after the body starts and it breaks the frames!

 

<script>
if (window!= top)
top.location.href=location.href
</script>

 

That's not java.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.