Changing frame size

I have HTML page with 2 frames. The problem I have is that I want to
change the size (width) of frames when user clicks on something (link)
in one of the frames. In the begining both frames have the same width,
but after user click I want one frame to shrink and the other to grow.
Is that possible in javaScript? If not, how could i do something like this?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

No, you cannot do it.

The simplest way to achieve that effect is make your link refer to another container with the new needed frames.


marko020397Author Commented:
I have tried this, but then the contents of frames change. Is it possible to look in both frames save contents (URLs) of frames and open new frameset with this contents?
This can be done with the methods of the document object.

Would you like a way to go, or do you need full code?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

marko020397Author Commented:
Give me just the way to do it. I will write it myself.
Just quit, Marko... if there is really a way to do that, then your page will probably have a lot of imcompatibility problems with browsers v3.0 or less. Well... I can just suggest you to quit with your idea.

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
Acually, superquestion is not wrong; any JavaScript way to accomplish the job would work great on some browser and give problems on others.

Anyway, if versions are not a concern, here is a general scheme of what i meant:

you could have a container page looking something like this:

    <SCRIPT LANGUAGE="JavaScript"><!--
      function updateFrames() {
        with(self.document) {
          writeln("  <FRAMESET ROWS=\"10,*\">");
          writeln("    <FRAME SRC=\"Left.htm\">");
          writeln("    <FRAME SRC=\"Right.htm\">");
          writeln("  </FRAMESET>");
    // --></SCRIPT>
    <FRAME SRC="Left.htm">
    <FRAME SRC="Right.htm">

And, in your - say - Left.htm there could be the needed link, looking like:

<A HREF="javascript:void(top.updateFrames())">Update Frame</A>

This a no-return script, i.e. you will update your frames once; but it could be easily modified to handle more complex cases.


P.S. About points: if what i have written is of any use to you, i hope you'll award me a few points anyway... (BTW, there are ways to share points among experts too, by asking EE support)
marko020397Author Commented:
Adjusted points to 500
marko020397Author Commented:
Sorry, Julio. I though I was grading your answer and giving 500 points. I didn't notice that you were giving a comment. Now I rewarded "superquestions" for suggestion to quit, which doesn't deserve 500 points.

Now. How should I give you points? I didn't quite understand what you were thinking.
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

From novice to tech pro — start learning today.