This is a migrated thread and some comments may be shown as answers.

[Solved] PanelBar Not focus only in edit mode not in publish mode

0 Answers 63 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Noob2008 Noob2008
Top achievements
Rank 1
Noob2008 Noob2008 asked on 03 Jul 2009, 11:13 AM
Hi guy

Sorry for the title there some TYPO it should be

'PanelBar Focus only in edit mode , but not in publish mode in sharepoint .'

I am working on sharepoint where i have a particular webpart in which has the control Radpanelbar

I tried  some script to do a focus on click but it wont work in my sharepoint webpart

The funny thing is if i were to go into the edit mode my code works it achieve what i want it to , it works! But after i publish it , My code dont work  .

Y is this so ?

The below attached is my code

Dim SelfLearningWP_RadPanelBarExpandJS As New StringBuilder  
            SelfLearningWP_RadPanelBarExpandJS.Append("<script type=""text/javascript""> ")  
            SelfLearningWP_RadPanelBarExpandJS.Append("function onClicking(sender, eventArgs) {")  
              
            SelfLearningWP_RadPanelBarExpandJS.Append("var itemText = eventArgs.get_item().get_text(); alert (itemText); var ele = eventArgs.get_item().get_element(); eventArgs.get_item().select(); ele.scrollIntoView(true);")  
SelfLearningWP_RadPanelBarExpandJS.Append("}")  
 
            SelfLearningWP_RadPanelBarExpandJS.Append("function getOffSetTop( oElement ){ var iReturnValue = 0;while( oElement != null ) {iReturnValue += oElement.offsetTop; oElementoElement = oElement.offsetParent; }return iReturnValue;}")  
            SelfLearningWP_RadPanelBarExpandJS.Append("</script>") 


Kindly advise

Thanks

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Noob2008 Noob2008
Top achievements
Rank 1
Share this question
or