linking to a js file action

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
muscroft
Beginner
Beginner
Posts: 3
Joined: Mon Jan 10, 2005 8:32 pm

linking to a js file action

Post by muscroft »

I have two links on my present site for disabled users. They allow for the alteration of text between lge txt and std txt.

One of the two links looks like this:
a href="#" onClick="setActiveStyleSheet('standard'); return false;"

and calls a javascript file into action.
How can I include this type of link into the Milonic Menu?
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi muscroft,

Load the .js file containing the definition for your setActiveStyleSheet() function as you normally would. To call the function from a menu item, do the following:

Code: Select all

aI("text=Standard Text;url=javascript:setActiveStyleSheet('standard');");
Hope that helps,

Kevin
muscroft
Beginner
Beginner
Posts: 3
Joined: Mon Jan 10, 2005 8:32 pm

JS call works OK

Post by muscroft »

Thanks Kevin.

I have put your quoted text in place and all works as planned.
Many thanks for responding so quickly and efficiently.

:D
Post Reply