Have the menu links call javascript functions instead of URL

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
fragile
Beginner
Beginner
Posts: 2
Joined: Thu Nov 11, 2004 4:43 pm

Have the menu links call javascript functions instead of URL

Post by fragile »

My webapp relies heavily on client-side javascript to display different views dynamically and I am considering using the milonic V5.0 navigation menu.

Is it possible to have the menu items call a javascript function instead of just passing it a URL e.g. clicking a link in the menu would call top.myfunction()

I am very impressed with the milonic menu thus far, it is very extensible :D
Shane
User avatar
fredlongworthhighschool
Mega Advanced
Mega Advanced
Posts: 362
Joined: Fri Jun 27, 2003 11:34 am
Location: Manchester, England.
Contact:

Post by fredlongworthhighschool »

Would this work:

Code: Select all

aI("text=Call Function;url=javascript:top.myfunction();");
Andy Davis
Web Designer & Smartboard Manager

Fred Longworth High School, Manchester, England.
fragile
Beginner
Beginner
Posts: 2
Joined: Thu Nov 11, 2004 4:43 pm

Post by fragile »

of course, thanks fredlongworthhighschool :D
Shane
User avatar
fredlongworthhighschool
Mega Advanced
Mega Advanced
Posts: 362
Joined: Fri Jun 27, 2003 11:34 am
Location: Manchester, England.
Contact:

Post by fredlongworthhighschool »

No problem, glad to be of help and to get in before John for a change!
Andy Davis
Web Designer & Smartboard Manager

Fred Longworth High School, Manchester, England.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

fredlongworthhighschool wrote:No problem, glad to be of help and to get in before John for a change!
Andy, you should know you're always welcome to jump in here. :)

Besides, I've been at the doctor all morning... :cry:
John
Post Reply