about frames

S

sudidelaravi

I have two frames in a frameset.Left frame has treeview.Right frame has
the aspx pages w.r.t nodes of treeview control.

When i perform some operation in the right frame, left frame(treeview
control) should also be reloaded(refreshed) along with the right frame
using javascript.
 
A

ASM

(e-mail address removed) a écrit :
I have two frames in a frameset.Left frame has treeview.Right frame has
the aspx pages w.r.t nodes of treeview control.

When i perform some operation in the right frame, left frame(treeview
control) should also be reloaded(refreshed) along with the right frame
using javascript.

Yes, and ? ... what is the question ?
 
A

ASM

(e-mail address removed) a écrit :
how could i do this?????????

Do what ? to reload a page ? in a specific frame ?
- parent.myFrame.reload();
- parent.myFrame.location = 'myFile.htm';
- self.location = 'myFrame.htm';
and so one

What does TreeView explain to you ?
Perhaps could you ask to its author or read his FAQ ?

Without knowing treeview how to imagine what to tell to him ?


With 2 frames (menu + viewer)
usual double link in menu is made this way :

<a href="page1.htm" target="leftFrame"
onclick="self.location='menu1.htm';">page one</a>

where 'leftFrame' is the *name* of frame to display the page (page1.htm)
 
S

sudidelaravi

(e-mail address removed) a écrit :


- parent.myFrame.reload();
- parent.myFrame.location = 'myFile.htm';
- self.location = 'myFrame.htm';
and so one

What does TreeView explain to you ?
Perhaps could you ask to its author or read his FAQ ?

Without knowing treeview how to imagine what to tell to him ?

With 2 frames (menu + viewer)
usual double link in menu is made this way :

<a href="page1.htm" target="leftFrame"
onclick="self.location='menu1.htm';">page one</a>

where 'leftFrame' is the *name* of frame to display the page (page1.htm)

--
what you have said is correct To reload a particular frame statically
with out any condition.
My requirement is When there occurs reload in the right frame,then
only left frame(treeview) should be loaded.
so how will u do that.
 
A

ASM

(e-mail address removed) a écrit :
what you have said is correct To reload a particular frame statically
with out any condition.
My requirement is When there occurs reload in the right frame,then
only left frame(treeview) should be loaded.

If it isn't reloaded in right frame how to tell something to left one ?
so how will u do that.

I don't know.

Try (not tested !) :

1) soluce 1
===========

In main framed page

a) in header :

<script type="text/javascript">
function surveyRight() {
parent.old = parent.old || parent.Right.location;
parent.new = parent.Right.location;
if (parent.new.toString() == parent.old.toString())
{
parent.Left.location = 'treeview.htm';
parent.Right.location = false;
}
else
parent.old = parent.new;
}
</script>

b) in frame 'Right'

<frameset ... >
<frame name="Right" onload="surveyRight()" ... >


2) soluce 2
===========

It is assumed only treeview opens pages
(and no links in right frame to reload same page)

In main framed page

a) in header :

<script type="text/javascript">

function lookOnRight(what) {
var old = parent.Right.location;
var new = what.href;
if (new.toString() == old.toString())
{
setTimeout(function(){parent.Left.location = 'treeview.htm';},50);
return false;
}
return true;
}
function addToLinks() {
var L = parent.Left.document.getElementsByTagName('A');
for(var i=0; i<L.length; i++ }
if(L.href) {
if(L.onclick)
L.onclick += function() { return lookOnRight(this) }
else
L.onclick = function() { return lookOnRight(this) }
}
}
</script>

b) in frame 'Left' :

<frameset ... >
<frame name="Left" onload="addToLinks()" ... >
 

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,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top