Making Javascript functions visible to multiple webforms

Posted on 2006-05-18
Last Modified: 2009-12-16
I have Javascript functions embedded in the HTML code of certain webforms, delimited by <Script> tags.  What is the best way to make these functions visible to multiple forms in my application?  

I'm using Visual Studio 2003.

(I know this is a very general question... Links to good websites would be fine as well)

Thanks for your help.
Question by:mbizup
    LVL 11

    Accepted Solution

    Check out this link:

    look for the following section: "Using the .js file to keep the javascript functions"

    LVL 17

    Assisted Solution

    put all js funcitions in one file .js example: "functions.js"

    and in the head of all form where you nee to use it add:

    <SCRIPT src="functions.js"></SCRIPT>

    in the src you have to put the correct path of the file
    LVL 61

    Author Comment

    TornadoV -- thanks for the URL
    lem2802 -- Thanks for the added explanation


    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
    User art_snob ( encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now