Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:55

Linking within the same document/page


Poster: TaughneeS
Dated: Tuesday November 25 2003 - 20:31:44 GMT

Hi. For some ridiculous reason my client wants to use this menu so he can link to various paragraphs within just ONE web page. I know that is not really the purpose for why this menu was written, but is there ANY way I can use an anchor tag within the submenus so that I can do an internal anchor link on this page? THANK YOU IN ADVANCE!!

:) TaughneeS

Re: Linking within the same document/page


Poster: kevin3442
Dated: Tuesday November 25 2003 - 23:34:21 GMT

TaughneeS wrote:
Hi. For some ridiculous reason my client wants to use this menu so he can link to various paragraphs within just ONE web page...

Not necessarily unreasonable, especialy for a paying client! ;)

You should be able to set up anchors at the intended target locations within the page, as you normally would, then specify the anchor destinations in each menu item's url property, using the the href syntax you would normally use in an <a> link. For example, suppose you set an anchor named "jump01" at a paragraph, like so:
Code:
<a name="jump01"></a>

You could have a menu item jump to that anchor like this:
Code:
aI("text=Goto Jump01;url=thePageFileName.htm#jump01;");

If the anchor is always on the current page (and your submenus are unique to each page), then you could shorten it by leaving the .htm file name out of the url, like so:
Code:
aI("text=Goto Jump01;url=#jump01;");

Hope that helps,

Kevin

Thanks


Poster: TaughneeS
Dated: Wednesday November 26 2003 - 1:14:53 GMT

Thanks Kevin, that did the trick ... I was so close. (And thus, so FRUSTRATED!) Thanks for helping a girl out in her time of need. :)

-TaughneeS :P

clickfunction and anchor names


Poster: cubefree
Dated: Thursday April 1 2004 - 0:03:18 BST

Forgive me for piggy-backing onto your topic, as mine is slightly different... but my clickfunction does not seem to be firing. I've added an alert, but nada. I'm doing this only to show state on my sub-navigation that uses anchor names. Pagematch does not seem to work if you click on link using an anchor name tag. After the page loads, try 'online invoicing' or 'data conversions'. The page should reload.

Some info:

http://www.cubefree.com/dev/services/printcmu.php#shelftalker




Code:

function resize() {
  alert('reloaded');
  document.location.href = history.go(0);
}

var wm = 'services/webmarketing';
var ts = 'services/techservices';
var pc = 'services/printcmu';
var pm = 'services/projectmanagement';

// bullet graphic (pi ~ pageimage)
var pi = ''; //'<img src='+DOM+'images/graphics/v_bullet.gif hspace=3 border=0>';

with(leftStyle=new mm_style()){
padding=0;
menuwidth=150;

//separatorsize=1;
//separatorimage = domlav+"dashedline.gif";
//separatorpadding=5;

align="right";
oncolor="#D3714E";
offcolor="#999999";
pagecolor="#C94522";
fontsize="10px";
fontstyle="normal";
fontfamily="Verdana, sans-serif;";
onbold=0;

if (ie) {
   overfilter="Fade(duration=2.0);Alpha(opacity=100)";
   outfilter="randomdissolve(duration=0.3)";
   }
}

var menu_top  = "text=<img src="+DOM+"images/spacer.gif width=150 height=18 border=0>;"
var sub_top   = "text=<img src="+DOM+"images/spacer.gif width=150 height=10 border=0>;"
var dasher    = "text=<img src="+domlav+"dashedline.gif width=150 height=1 vspace=5 border=0>;"
var sepp      = 'separatorsize=1;separatorpadding=5;';



with(milonic=new menuname("services")){
style=leftStyle;
top=158;
left=leftnav_left;
menuwidth=150;
alwaysvisible=1;
orientation="vertical";
followscroll = "55,50,15";

aI("image="+domlav+"services.gif;url="+DOM+"services/index.php;separatorsize=0;");
aI(menu_top);

aI("image="+domlav+"webmarketing.gif;overimage="+domlav+"webmarketing_f2.gif;url="+DOM+"services/webmarketing.php;pageimage="+domlav+"webmarketing_f3.gif;pagematch="+DOM+"services/webmarketing;");

if (url.indexOf(wm) != -1) {
   aI(sub_top);
   aI("text="+pi+"design \& development;"+sepp);
   aI("text="+pi+"online marketing;"+sepp);
   aI("text="+pi+"online advertising;"+sepp);
   aI("text="+pi+"search engine rankings;"+sepp);
}
aI(dasher);

aI("image="+domlav+"techservices.gif;overimage="+domlav+"techservices_f2.gif;url="+DOM+"services/techservices.php;pageimage="+domlav+"techservices_f3.gif;pagematch="+DOM+"services/techservices;");

if (url.indexOf(ts) != -1) {
   aI(sub_top);
   aI("text="+pi+"database / web applications;"+sepp);
   aI("text="+pi+"e-commerce;"+sepp);
   aI("text="+pi+"content management systems;"+sepp);
}
aI(dasher);

aI("image="+domlav+"printcmu.gif;overimage="+domlav+"printcmu_f2.gif;url="+DOM+pc+".php;pageimage="+domlav+"printcmu_f3.gif;pagematch="+DOM+pc+";");

if (url.indexOf(pc) != -1) {
   aI(sub_top);   
   aI("text="+pi+"shelf talkers;url="+DOM+pc+".php#shelftalker;"+sepp+"clickfunction=alert('reloaded');");
   aI("text="+pi+"data conversions;url="+DOM+pc+".php#data;"+sepp+"clickfunction=resize();");
   aI("text="+pi+"online invoicing;url="+DOM+pc+".php#invoicing;"+sepp+"clickfunction=resize();");
}
aI(dasher);

aI("image="+domlav+"projectmanagement.gif;overimage="+domlav+"projectmanagement_f2.gif;url="+DOM+"services/projectmanagement.php;pageimage="+domlav+"projectmanagement_f3.gif;pagematch="+DOM+"services/projectmanagement;");

if (url.indexOf(pm) != -1) {
   aI(sub_top);
   aI("text="+pi+"strategy;url="+DOM+pm+"_strategy.php;"+sepp);
   aI("text="+pi+"development;url="+DOM+pm+"_development.php;"+sepp);
   aI("text="+pi+"management;url="+DOM+pm+"_management.php;"+sepp);
   aI("text="+pi+"promotion;url="+DOM+pm+"_promotion.php;"+sepp);
}

}