Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Question for the group

  Asked By: Devika    Date: May 03    Category: Sharepoint    Views: 1093

The attached image shows the portal link after I have placed web part on a WSS page; I really like how he has added the "Down to" arrow. I would like to be able to accomplish this using a menu that I created based off of code Dustin Miller shared ( www.sharepointblogs.com/.../339.aspx). The problem is I am not a developer :)

I generally take code that people have written and modify it slightly to meet my specific needs. Can anyone point me to an existing article/resource that might explain how to do this?



2 Answers Found

Answer #1    Answered By: Isidro Berger     Answered On: May 03

What follows is sample code  showing how to create a dynamically
generated menu  in WSS; drop it into a CEWP to and mouse over the arrow:

<menu id="menu_WPQ_" class="ms-SrvMenuUI"></menu>
<SPAN class="ms-HoverCellInActive"
style="CURSOR: hand"
nowrap valign="bottom"
<IMG SRC="/_layouts/images/Menu1.gif" border="0" />

<script type="Text/JavaScript" language="JavaScript">
// Generate dynamic menu example
// todd@... MindsharpBlogs.com/Todd
// CopyRight (c) 2006, All Rights Reserved
// Last updated 03/24/2005
// Please don't delete this header

var IMG_PATH = "/_layouts/images/";
var SEP = ", ";

var menu = document.getElementById("menu_WPQ_");

function MainMenu(span)
this.className = "ms-HoverCellActiveDark";

var options = new Array(8);
options[0] = "http://www.altavista.com, AltaVista";
options[1] = "http://web.ask.com, Ask";
options[2] = "http://www.google.com, Google";
options[3] = "http://www.hotbot.com, HotBot";
options[4] = "http://search.lycos.com, Lycos";
options[5] = "http://search.msn.com, MSN";
options[6] = "http://www.search.com, CNet";
options[7] = "http://search.yahoo.com, Yahoo!";

//Define a wss  dynamic smart menu
//Add an option
CAMOpt(menu, "option1",
IMG_PATH + "aca16.gif", "Menu tooltip is broken");

//Add a Seperator

//Add a submenu with two options
var opts = CASubM(menu, "More Options",
IMG_PATH + "active.gif", "submenu tooltip also broken");

var opts11 = CASubM(opts, "Option 1.1",
IMG_PATH + "acl16.gif", "");
CAMOpt(opts, "Option 1.2",
IMG_PATH + "acl16.gif", "");

for(var i=0; i<options.length; i++)
option = options[i].split(SEP);
optionUrl = option[0];
optionName = option[1];

CAMOpt(opts11, optionName,
"document.location.href=\"" + optionUrl + "\";","", "");

OMenuInt(menu_WPQ_, span, 0, 0, 0);

Answer #2    Answered By: Schuyler Le     Answered On: May 03

Can you explain  how you got the drop down arrow to display to the right of the link  to the portal  in your webpart?

Didn't find what you were looking for? Find more on Question for the group Or get search suggestion and latest updates.