Dynamic Resize left frame in a frameset with php

I am trying to resize the left frame in a frameset dynamicaly. I do not want to remove the left frame, only resize the width from 270 to 10 pixels. This is easy to do. My problem is to keep the content of the other frames when maximizing and minimizing the left frame with php.

I use this code with a minimize button and a maximize button:

$strekk = $_REQUEST['strekk'];
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


            <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
            <meta name="generator" content="My Page">
            <title>My Page</title>

      <frameset border="0" bordercolor="#dddddd" frameborder="no" framespacing="0" cols="<?PHP echo $strekk?>,*">
            <frameset border="0" bordercolor="#dddddd" cols="*,10" frameborder="no" framespacing="0" rows="*">
                  <frameset border="0" bordercolor="#dddddd" frameborder="no" framespacing="0" rows="17,*">
                        <frame name="Navi head" scrolling="no" src="navi_head.php">
                        <frame name="Navi" src="navi.php">
                  <frame name="Mellombak" scrolling="no" src="mellom.php">
            <frameset border="0" bordercolor="#dddddd" frameborder="no" framespacing="0" rows="28,*">
                  <frame name="Menu" scrolling="no" src="menu.php">
                  <frame name="Data" noresize src="index.php">

                  <body bgcolor="#ffffff">



Do anyone know a way to do this?
Hans Inge HagenOwner and programmerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can achieve this with javascript.

Check this url for examples:
Hans Inge HagenOwner and programmerAuthor Commented:
I am not able to see how this script can keep the content (example: you navigate to a page and the main frame change content). I need it to be a toogle button where I can hide the navigation if needed and keep the mainframe content. Anyway, thanks for the reply!
I agree with b_loco, you can do it with javascript.
What is wrong with these two files as an example?

        <frameset name= "totalFrame" id="totalFrame" cols=270,*>
                <frame src="side.html" name="side" id="side" >
                <frame src="" name="main" id="main" > 

side.html :

<script language="javascript">
function toggle() {
if (parent.document.all("totalFrame").cols=="50,*") {
} else {
<button onclick='toggle();'>toggle</button>
     <br> <a href="http://www.cnn.com" target='main'>cnn</a>

The toggle works and the main frame can change its content as much as you like.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.