Hi.
I am trying to add a new button to the NAVBAR in OWA 2007. This button would
just be a hyperlink that would open its target when clicked on. I have done
this with OWA 2003, having trouble with 2007.
If I modify startpage.aspx and add the code below, a second contacts button
is added to the NAVBAR however I can't figure out how to change its target,
or the label on the button.
Does anyone have some sample code that could point me in the right direction?
<% if (UserContext.IsFeatureEnabled(Feature.Contacts)) { %>
<tr>
<td class="nbMnuItm">
<a id="lnkCtcts" <%RenderOnClick("navCtcts();");%><%="
"%><%RenderHighlight(NavigationModule.Contacts); %> href="#">
<% RenderingUtilities.RenderNavigationBarImage(Response.Output, 2,
UserContext); %>
<div id=divTxCtcts
<%RenderHighlightText(NavigationModule.Contacts);%>><%=
LocalizedStrings.GetHtmlEncoded(Strings.IDs.Contacts) %></div>
</a>
</td>
</tr>
<% } %>
You need to get rid of the server side code and just put your own labels and
Targets into the onclick event. It depends what you trying to target you may
need to modify a few of javascript files but for something easy for eg this
will create a button with a label called Yahoo Mail and will launch Yahoo
mail in a separate Window if you click the icon
<tr>
<td class="nbMnuItm">
<a id="yhmail"
onClick="window.open('http://mail.yahoo.com','mywindow','width=1200,height=700,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes')"
href="#">
<% RenderingUtilities.RenderNavigationBarImage(Response.Output, 0,
UserContext); %>
<div id=divTxCtcts class=nbtx>Yahoo Mail</div>
</a>
</td>
</tr>
Cheers
Glen
> Hi.
>
[quoted text clipped - 27 lines]
> </tr>
> <% } %>
Joe - 24 Aug 2007 06:14 GMT
This is great!!
If I wanted to modify this so that the target opened in the same window,
what would I change
onClick="window.open
to, to make the web page in my link appear in the same frame that displays
the targets of the other links on the nav bar?
Thanks for the help.
> You need to get rid of the server side code and just put your own labels and
> Targets into the onclick event. It depends what you trying to target you may
[quoted text clipped - 48 lines]
> > </tr>
> > <% } %>
Glen Scales [MVP] - 24 Aug 2007 07:44 GMT
To open the URL in the same window you need to use something like
<a id="yhmail" onClick="window.location.href='http://mail.yahoo.com';"
href="#">
instead. As far as I can tell OWA doesn't use frames so it not just as easy
as setting the frame source if you want to maintain the navBars. If you want
to navigate to another Exchange folder you could probably hack the unav.js
file. Or maybe do some serious customization of Startpage.aspx its all html
so it should be possible.
Cheers
Glen
> This is great!!
>
[quoted text clipped - 64 lines]
>> > </tr>
>> > <% } %>
Joe - 31 Aug 2007 00:02 GMT
This has worked absolutly great, thank you.
One more question, the icon on the new custom link on the Nav Bar. Where is
it getting that from? Is it possible to specify a custom Icon?
Thanks.
> To open the URL in the same window you need to use something like
>
[quoted text clipped - 78 lines]
> >> > </tr>
> >> > <% } %>
Glen Scales [MVP] - 31 Aug 2007 04:22 GMT
Which image is used is determined by the Serviceside code <%
RenderingUtilities.RenderNavigationBarImage(Response.Output, 0,
UserContext); %>
This gets rendered as <img class="pr"
src="8.1.85.4/themes/base/navicons.gif"> down to the browser. The same image
gets used for each link with a bit fancy placement with the stylesheet. But
the easiest thing to do would be just to replace the line
<% RenderingUtilities.RenderNavigationBarImage(Response.Output, 0,
UserContext); %> with your own image node and as long as you get the size
and colours okay it should work.
Cheers
Glen
> This has worked absolutly great, thank you.
>
[quoted text clipped - 98 lines]
>> >> > </tr>
>> >> > <% } %>
Joe - 31 Aug 2007 07:58 GMT
That worked perfect. I now have several custom Nav buttons with custom icons.
Thanks again for the help.
> Which image is used is determined by the Serviceside code <%
> RenderingUtilities.RenderNavigationBarImage(Response.Output, 0,
[quoted text clipped - 114 lines]
> >> >> > </tr>
> >> >> > <% } %>
Chris Myers - 31 Jul 2008 11:21 GMT
Joe,
Sorry for contacting you in this way, but you seem to be the only person on
the internet who knows how to add a nav bar button to OWA 2003!!!
All i need is a button which opens a link to Sharepoint in a new window.
Any help is greatly apprecieated
Kind regards
Chris Myers
> That worked perfect. I now have several custom Nav buttons with custom icons.
>
[quoted text clipped - 118 lines]
> > >> >> > </tr>
> > >> >> > <% } %>