Hello,
In Sharepoint, all Quick Launch entries must have an associated URL. I use a false URL for items that are top-level categories. Sometimes the top-level is a proper URL. Thus, I want to test on any selected URL to see if it contains my false URL before allowing the event to proceed. Unfortunately, I cannot figure out how to get the selected URL as text. The LinkElement displays as the URL, but testing on it does not work. Here's a sample of what I am trying to do:
<script type="text/javascript">
function OnClientItemClickingHandler(sender, eventArgs)
{
if(eventArgs.Item.Expanded == true)
{
eventArgs.Item.Collapse();
}
else
{
eventArgs.Item.Expand();
}
if(eventArgs.Item.LinkElement.indexOf("go_nowhere")>-1)
{
return false;
}
}
</script>
My Panelbar has an OnClientItemClicking event that calls this function.
Any help would be appreciated.
Thank you,
Doug
In Sharepoint, all Quick Launch entries must have an associated URL. I use a false URL for items that are top-level categories. Sometimes the top-level is a proper URL. Thus, I want to test on any selected URL to see if it contains my false URL before allowing the event to proceed. Unfortunately, I cannot figure out how to get the selected URL as text. The LinkElement displays as the URL, but testing on it does not work. Here's a sample of what I am trying to do:
<script type="text/javascript">
function OnClientItemClickingHandler(sender, eventArgs)
{
if(eventArgs.Item.Expanded == true)
{
eventArgs.Item.Collapse();
}
else
{
eventArgs.Item.Expand();
}
if(eventArgs.Item.LinkElement.indexOf("go_nowhere")>-1)
{
return false;
}
}
</script>
My Panelbar has an OnClientItemClicking event that calls this function.
Any help would be appreciated.
Thank you,
Doug