Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

My question is simple:

How do I select a ribbon.read with javascript? For example i have a different tab selected but clicking on the button i would like to select Ribbon.read ... any adivces?

Thanks

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

I'm not sure if I understand you correctly, but this code should select the Ribbon.Read

var ribbon = SP.Ribbon.PageManager.get_instance().get_ribbon();
SelectRibbonTab("Ribbon.Read", true);
share|improve this answer
    
yeah, i tried that but i dont get the instance of ribbon it is undefined, also if i use the function: ExecuteOrDelayUntilScriptLoaded with parameter sp.ribbon.js –  Shkipper Oct 29 '12 at 11:47
    
is get_instance or get_ribbon undefined? –  Aljoscha Husp Oct 29 '12 at 11:51
    
it says SP.Ribbon.PageManager is null or not an object –  Shkipper Oct 29 '12 at 12:08
    
Even SP.Ribbon is undefined :( –  Shkipper Oct 29 '12 at 12:27
    
Looks like you don't use the correct namespace then (SP.Ribbon) ;-) –  Aljoscha Husp Oct 29 '12 at 12:43
show 9 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.