WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 xtree selection problem in frames, Redtopia, November 29, 2004
     Re:xtree selection problem in frames, Redtopia, November 29, 2004
         Re:xtree selection problem in frames, Redtopia, November 29, 2004
             Re:xtree selection problem in frames, Redtopia, November 30, 2004
     Re:xtree selection problem in frames, Redtopia, November 29, 2004
         Re:xtree selection problem in frames, Redtopia, November 29, 2004

Subject: Re:xtree selection problem in frames From: Redtopia Date: November 30, 2004

I figured out how to call the blur() and focus() functions, but it doesn't completely solve the problem. The multi-select problem still exists when you click on a different xtree node to focus the xtree window. Any ideas? The followng code helps keep the xtree selection state valid between window focus states, but the onblur event is not triggered when the window loses focus. Why? Get this: The onblur event does get triggered when the window re-gains focus! It does not get triggered when the entire frame loses focus to another frame. I can't figure out when the onblur event is called.

function FocusTreeFrame () {
 if (webFXTreeHandler.selected != null) {
  webFXTreeHandler.selected.focus ();
  }
 return (true);
}
function BlurTreeFrame () {
 if (webFXTreeHandler.selected != null)
  webFXTreeHandler.selected.blur ();
 return (true);
}

and call them like:

<body onfocus="FocusTreeFrame();" onblur="BlurTreeFrame();">

 However, it does keep multi-select from happening if you don't click on an xtree node.

From: Redtopia
Sent: November 29, 2004
Subject: Re:xtree selection problem in frames

This multi-select behavior can be replicated on the xtree demo page by following the steps below. I think it can be fixed with calls to:

webFXTreeHandler.focus ();
webFXTreeHandler.blur ();

Like so:

<body onfocus="webFXTreeHandler.focus();" onblur="webFXTreeHandler.blur ();">

Except, I get a javascript error: "id is null or not an object."

How can I make these calls during onfocus/onblur events?

-JP

From: Redtopia
Sent: November 29, 2004
Subject: Re:xtree selection problem in frames

Here's a correction to the behavior that creates the bad selection:

Select an xtree node in a browser window.

Select a different browser window (any will do) and move it so you can see the xtree in the previous window.

Click in the xtree on a different node. You will see that the previous selection sticks.


 

From: Redtopia
Sent: November 29, 2004
Subject: Re:xtree selection problem in frames

I've got an xtree selection problem when clicking between frames. How do I maintain a single selection in the xtree? I would like to keep the current xtree selection visible, even when the xtree frame is not in focus.

I've got 2 frames: an xtree frame and a content frame.

After clicking on a node in the xtree, it becomes selected. Then when I click in a different frame, and then back to the xtree frame, I can end up with 2 selections. The original xtree node that was selected stays selected, and if I click on a different node, that node also becomes selected. I can do this many times, creating many selections.

Thanks,
-JP







Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX