Click to See Complete Forum and Search --> : Having trouble setting the target.


shaunc
10-08-2003, 10:48 AM
I found code of the net which allows the creatin of Dynamic menus - I've got it to work on my system the only problem being is to target the particular links to the right frame because there is no place in the js.script where it does it, well that I can find.

I'm going to attach the function in the js page where the link is set, maybe someone out there knows where I can put the target page.

this.linkText = this.array[1];

function HM_f_LinkIt() {
HM_f_HideAll();
if (this.linkText.indexOf("javascript")!=-1) eval(this.linkText)
location.href = this.linkText;
}

dragle
10-08-2003, 01:55 PM
That's an older version of HierMenus; specifically, somewhere between v4.0 and 4.0.5, inclusive. First note this bug: the quoted string javascript in the example you provided should include a colon at the end of it.

Once you've made that fix you can target other frames, or execute any JavaScript function from within your links by setting your page references within your menu items to be javascript URLs. This FAQ page has more on the topic:

http://www.webreference.com/dhtml/hiermenus/faq/faq3.html

Cheers!

shaunc
10-09-2003, 04:11 AM
Thanx Dragal we got it sorted from your advice.
Later Mate