Welcome Guest Search | Active Topics | Sign In | Register

TreeView eo_GetEventInfo() Options
Murugan
Posted: Monday, April 21, 2008 6:02:52 AM
Rank: Member
Groups: Member

Joined: 5/31/2007
Posts: 13
Hi,
I have downloaded and installed the latest version EOWeb_2007_2_Setup. In the earlier version, i would get the clicked item object using eo_GetEventInfo().getItem() in my client-side event. In the current version, it is not returning the object instead of object it is returning "undefined". I am unable to move further steps.
Please provide me the solution as early as possible.

Thanks,
Murugan.V
eo_support
Posted: Monday, April 21, 2008 6:36:31 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

We are not aware of anything regarding that has been changed. The function is still there. Can you provide a reproducing sample page? You can also get the event object from your event handler argument instead of calling eo_GetEventInfo directly:

http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Handlers.navigator_event_handler.html

The second parameter is the event info.

Thanks
Murugan
Posted: Monday, April 21, 2008 7:34:52 AM
Rank: Member
Groups: Member

Joined: 5/31/2007
Posts: 13
My ASPX Page :
<eo:treeview id="tvCauseTree" runat="server" Width="100%" Height="100%"
ondblclick="OnTvDblClick();" AutoScroll="true" OnClick="OnItemClick();">
</eo:treeview>

Javascript :
function OnItemClick()
{
sSelectedItem = eo_GetEventInfo().getItem();
}

function OnTvDblClick()
{
if(typeof(eo_GetEventInfo().getItem()) != "undefined")
ReturnData(eo_GetEventInfo().getItem());
}


These are the scripts which i'm running thru the pages. In the Earlier version,it was working fine.
eo_support
Posted: Monday, April 21, 2008 7:48:45 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

Do the following:

Code: HTML/ASPX
<eo:treeview id="tvCauseTree" 
runat="server" Width="100%" Height="100%" 
ondblclick="OnTvDblClick();" AutoScroll="true" 
ClientSideOnItemClick="OnItemClick">
</eo:treeview>


Code: JavaScript
var g_LastSelectedItem = null;

function OnItemClick(e, info)
{
    g_LastSelectedItem = info.getItem();
}

function OnTvDblClick()
{ 
    if (g_LastSelectedItem)
        ReturnData(g_LastSelectedItem);
}


Note OnItemClick is no longer hooked up through OnClick, but ClientSideOnItemClick.

Thanks
Murugan
Posted: Monday, April 21, 2008 8:54:59 PM
Rank: Member
Groups: Member

Joined: 5/31/2007
Posts: 13
ClientSideOnItemClick event is not getting fired. It is not working. Always it returns null, when i debug the OnTvDblClick() function.
eo_support
Posted: Tuesday, April 22, 2008 6:32:31 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

We are not aware of any problem with ClientSideOnItemClick, so it might have something to do with other content in your page. Try follow steps outlined in this post to trouble shoot the problem:

http://www.essentialobjects.com/Forum/default.aspx?g=posts&t=1186

If the problem persists, we would need you to create a test page to either send to us or post it online so that we can see the problem in order to find out the root cause.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.