CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2001
    Location
    UK
    Posts
    308

    Calling Function from other .js File

    Hi,

    i have a file by the name "menu.js" which contains few functions (like DropMenu, HideMenu..)..
    i wanted to call these function from other files like "index.htm".. how to call these functions.

    Thanks in adv..
    Venu Bharadwaj
    "Dream it. U can do it!"

  2. #2
    Join Date
    Sep 1999
    Location
    Leeds U.K. (Proud to be Sheffield Born)
    Posts
    202

    Simple

    Just link th e .js file thus:
    <script language="javascript" src="thisfolder/menu.js">
    </script>

    and then call your functinos as you would any other:
    <script language="javascript">
    var f;
    f = DropMenu(someArg, otherArg);
    </script>
    .. or whatever.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured