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
Kindly advise
Thanks
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