Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: OnItemOpenHandler
leonardhome
Junior Member

Posts: 3
Registered: 2/2/2005
Member Is Offline
posted on 2/8/2005 at 03:13 PM Reply With Quote
OnItemOpenHandler


I am trying to use the value of the variable "myitemtext" on another page in my frameset, but on the other page it reports "undefined". An alert in tree.tpl reports the correct value. I've included the code I'm using in my tree.tpl file below. Is it possible to do this?
Am I missing a basic javascript concept?

function OnItemOpenHandler (o_item) {
if (o_item.a_config[2] && o_item.a_config[2]['myID']) {
var n_myID = o_item.a_config[2]['myID'];
myitemtext = n_myID;
alert(myitemtext);
parent.setTextLink(myitemtext);
return true;
}
}

Thanks in advance for any help!
View User's Profile View All Posts By User U2U Member
jshuusko
Junior Member

Posts: 2
Registered: 2/13/2005
Member Is Offline
posted on 2/13/2005 at 09:02 PM Reply With Quote

You should refer to the variable with the frame name or number.

alert(top.frames['theOtherFrame'].myitemtext);
View User's Profile View All Posts By User U2U Member
leonardhome
Junior Member

Posts: 3
Registered: 2/2/2005
Member Is Offline
posted on 2/16/2005 at 08:13 PM Reply With Quote

Thanks for the suggestion.

I was able to fix my variable problem by declaring it as a global variable. In my haste to get this working I didn't look close enough at my own code.

Thanks again.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Multiple Trees
Frames Targeting
Icons and Styles Overloading
Event Handling
Performance Test
Version 1.2 features
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004