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:27
Can i get the path of my links ?
Poster: gerarcyr
Dated: Thursday November 3 2005 - 10:47:17 GMT
Hello,
I'm using the vertical plain text menu.
I would like to know if it's possible to get the path of my links ?
exemple :
Menu1
-submenu11
-submenu12
Menu2
-submenu21
-submenu22
If i click on submenu22, i would like to get the path of the link (menu2/submenu22")
Thank you in advance for your help
Poster: Andy
Dated: Thursday November 3 2005 - 11:08:56 GMT
Hi,
Here is some code to generate bread crumbs:
mm_Separator=">";
function getYourAreHereArray()
{
_bC=[]
yaha=[]
if(_cip.length>0){
for(_c=0;_c<_cip.length;_c++){
_ci=_cip[_c];
_mni=getParentItemByItem(_ci);
if(_mni==-1)_mni=_ci
if(_mni+" "!=$u){
while(_mni!=-1){
_bC[_bC.length]=_mi[_mni][1]
_omni=_mni
_mni=getParentItemByItem(_mni);
if(_mni==_omni||_mni+" "==$u)_mni=-1
}
}
}
for(_c=_bC.length-1;_c>=0;_c--)yaha[yaha.length]=_bC[_c]
yaha[yaha.length]=_hx[_hx.length-1]
}
return yaha
}
youAreHereArray=getYourAreHereArray()
myOutput=""
for(_c=0;_c<youAreHereArray.length;_c++){
myOutput+=youAreHereArray[_c]
if(_c<youAreHereArray.length-1)myOutput+=mm_Separator
}
alert(myOutput)
Hope this helps
Milonic Support
Poster: gerarcyr
Dated: Thursday November 3 2005 - 13:29:24 GMT
Thk you.
But there is again 1 pb :
the result of this function is path>file.extension but i would like path>name of the item
like in my example:
menu1
- submenu11 (url=page11.htm)
- submenu12 (url=page12.htm)
menu2
- submenu21 (url=page21.htm)
if i click on submenu21, i would like to have menu2>submenu21 and not menu2>page21.htm
Poster: gerarcyr
Dated: Thursday November 3 2005 - 13:36:21 GMT
gerarcyr wrote:
Thk you.
But there is again 1 pb :
the result of this function is path>file.extension but i would like path>name of the item
like in my example:
menu1
- submenu11 (url=page11.htm)
- submenu12 (url=page12.htm)
menu2
- submenu21 (url=page21.htm)
if i click on submenu21, i would like to have menu2>submenu21 and not menu2>page21.htm
But there is again 1 pb :
the result of this function is path>file.extension but i would like path>name of the item
like in my example:
menu1
- submenu11 (url=page11.htm)
- submenu12 (url=page12.htm)
menu2
- submenu21 (url=page21.htm)
if i click on submenu21, i would like to have menu2>submenu21 and not menu2>page21.htm
and it doesn't work with iframe...
Poster: Andy
Dated: Thursday November 3 2005 - 15:21:35 GMT
Try this:
Code:
mm_Separator=">";
function getYouAreHereArray()
{
_bC=[]
yaha=[]
//alert(_cip)
if(_cip.length>0){
for(_c=0;_c<_cip.length;_c++){
_ci=_cip[_c];
_mni=getParentItemByItem(_ci);
if(_mni==-1)_mni=_ci
if(_mni+" "!=$u){
while(_mni!=-1){
_bC[_bC.length]=_mni
_omni=_mni
_mni=getParentItemByItem(_mni);
if(_mni==_omni||_mni+" "==$u)_mni=-1
}
}
}
for(_c=_bC.length-1;_c>=0;_c--)yaha[yaha.length]=_bC[_c]
yaha[yaha.length]=_cip[_cip.length-1]
}
return yaha
}
youAreHereArray=getYouAreHereArray()
myOutput=""
for(_c=0;_c<youAreHereArray.length;_c++){
myOutput+=_mi[youAreHereArray[_c]][1]
if(_c<youAreHereArray.length-1)myOutput+=mm_Separator
}
alert(myOutput)
function getYouAreHereArray()
{
_bC=[]
yaha=[]
//alert(_cip)
if(_cip.length>0){
for(_c=0;_c<_cip.length;_c++){
_ci=_cip[_c];
_mni=getParentItemByItem(_ci);
if(_mni==-1)_mni=_ci
if(_mni+" "!=$u){
while(_mni!=-1){
_bC[_bC.length]=_mni
_omni=_mni
_mni=getParentItemByItem(_mni);
if(_mni==_omni||_mni+" "==$u)_mni=-1
}
}
}
for(_c=_bC.length-1;_c>=0;_c--)yaha[yaha.length]=_bC[_c]
yaha[yaha.length]=_cip[_cip.length-1]
}
return yaha
}
youAreHereArray=getYouAreHereArray()
myOutput=""
for(_c=0;_c<youAreHereArray.length;_c++){
myOutput+=_mi[youAreHereArray[_c]][1]
if(_c<youAreHereArray.length-1)myOutput+=mm_Separator
}
alert(myOutput)
I will need to see how you are implementing IFRAMES to be able to see how to get it to work for you. Do you have a URL I can see?
Poster: Ruth
Dated: Thursday November 3 2005 - 15:27:32 GMT
Andy,
Will the mm_passItemRef do what is wanted?
Ruth
Poster: Andy
Dated: Thursday November 3 2005 - 15:36:33 GMT
Quote:
Will the mm_passItemRef do what is wanted?
It might do...
gerarcyr!! - is http://support.milonic.com/demos/pass_i ... /index.htm of any use to you?
Poster: Ruth
Dated: Thursday November 3 2005 - 16:22:41 GMT
gerarcyr, I'm fixing the download zip file right now, adding the new mm_passItemRef.js. For now you can get the new one here. Just replace the one in the zip file with that.
http://support.milonic.com/demos/pass_i ... ItemRef.js
Poster: gerarcyr
Dated: Friday November 4 2005 - 7:42:44 GMT
Andy wrote:
Quote:
Will the mm_passItemRef do what is wanted?
It might do...
gerarcyr!! - is http://support.milonic.com/demos/pass_i ... /index.htm of any use to you?
This is exacltly what i want.
I will try to use it.
Thanks a lot !
Poster: gerarcyr
Dated: Friday November 4 2005 - 7:42:59 GMT
Andy wrote:
Quote:
Will the mm_passItemRef do what is wanted?
It might do...
gerarcyr!! - is http://support.milonic.com/demos/pass_i ... /index.htm of any use to you?
This is exacltly what i want.
I will try to use it.
Thanks a lot !