Refreshing frames

E

Evan

Let me just start by saying... and I truly do mean this... I HATE
frames. Now that I have that out of my system, unfortnualty I do not
have a choice and am forced to use the complex structure that I am so
SO needing help with. My framesets look like this

---------------------
| title |
|--------------------
| buttons |
|--------------------
| base |
|--------------------

inside the base frame I have ANOTHER frameset... split into frmLeft
and frmRight... now if your mind isnt tied into knots... I am sure
this will do it... I have a button called 'add category', which is on
the buttons frame. When I click the button, I get a popup with the
details... I add the category details... then I need the frame titled
frmLeft to refresh. Is this possible ? I know it is just one line of
code by I might as well be trying to work out the formula for time
travel !

Any help would be appreciated

Evan
 
L

Lee

Evan said:
Let me just start by saying... and I truly do mean this... I HATE
frames. Now that I have that out of my system, unfortnualty I do not
have a choice and am forced to use the complex structure that I am so
SO needing help with. My framesets look like this

---------------------
| title |
|--------------------
| buttons |
|--------------------
| base |
|--------------------

inside the base frame I have ANOTHER frameset... split into frmLeft
and frmRight... now if your mind isnt tied into knots... I am sure
this will do it... I have a button called 'add category', which is on
the buttons frame. When I click the button, I get a popup with the
details... I add the category details... then I need the frame titled
frmLeft to refresh. Is this possible ? I know it is just one line of
code by I might as well be trying to work out the formula for time
travel !

From the popup window, the attribute you need to refresh is

opener.parent.frmLeft.location

Depending on what you mean by refresh, you might want either:


opener.parent.frmLeft.location.refresh(true);
or

opener.parent.frmLeft.location = someURL;

Here's an example that sets the location to a new URL.
Don't let the fact that I define the HTML for each frame in
script overwhelm you. The string value for each frame's
HTML is exactly what would appear in each separate file:



<html>
<head>
<script type="text/javascript">
var titleHTML= "<html><body><h1>Title<\/h1><\/body><\/html>";

var buttonHTML= [ "<html><body><button onclick='",
"window.open(\"javascript:eek:pener.top.popupHTML\",",
"\"popup\",\"width=200,height=200,resizable\")'",
">add category<\/button>",
"<\/body><\/html>"].join("");

var popupHTML= [ "<html><body><button onclick='",
"opener.parent.frmLeft.location=",
"\"http://www.google.com\";self.close()'>",
"Google<\/button>",
"<\/body><\/html>"].join("");

var frmLeftHTML= "<html><body><h3>frmLeft<\/h3><\/body><\/html>";
var frmRightHTML= "<html><body><h3>frmRight<\/h3><\/body><\/html>";
</script>
</head>
<frameset rows="20%,30%,*">
<frame name="title" src="javascript:top.titleHTML">
<frame name="buttons" src="javascript:top.buttonHTML">
<frameset cols="50%,*">
<frame name="frmLeft" src="javascript:top.frmLeftHTML">
<frame name="frmRight" src="javascript:top.frmRightHTML">
</frameset>
</frameset>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top