Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4004048
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:13:32+00:00 2026-05-20T08:13:32+00:00

I am writing some scripts that I broke up into separate files. I am

  • 0

I am writing some scripts that I broke up into separate files. I am wondering is it possible to get intellisense working on my custom scripts.

Say I have Script A with some functions that I need to use in Script B. It would be cool if I could see those functions in Script B while I am typing.

I tried to do the xml reference comment

/// <reference path="A.js" />

but this does not seem to do anything.

Thanks

Edit

// script 1

var abc = (function (my, $)
{
    my.events = function ()
   {
        // selectors is from my base file(not shown as I don't think it is needed to be shown)
        // my.selectors.createFrm = '#createFrm'
        var createSubmitFrmHandler = $(my.selectors.createFrm).live('submit', function (e)
        {
            e.preventDefault();
        });

   }

   return my;

} abc || {}, jQuery));

// script 2

var abc = (function (my, $)
{
     my.dialogs = {

        addDialog: function ()
        {
            var $dialog = $('<div></div>').dialog(
            {
                width: 580,
                height: 410,
                resizable: false,
                modal: true,
                autoOpen: false,
                title: 'Basic Dialog',
                buttons:
                    {
                        Cancel: function ()
                        {
                            $(this).dialog('close');
                        },
                        'Create': function ()
                        {

                            jQuery.validator.unobtrusive.parse(my.selectors.createFrm)
                            // this is undefined as page loadup no form was found so live did not kick in
                            my.createSubmitFrmHandler.validate().form();

                        }
                    }
            });

            return $dialog;
        },

    return my;
} abc || {}, jQuery));

So I have something like that.

If I am in Script 2 if I go to “my.” I see nothing in intellisense.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T08:13:32+00:00Added an answer on May 20, 2026 at 8:13 am

    I declare my function in a file (JScript1.js) and add in the intellisense (the comments)

    var myFunc = function (myParam) {
        /// <summary>
        /// This is my summary
        /// </summary>
        /// <param name="myParam" type="String">
        /// This the comment for the parameter
        /// </param>
        /// <returns type="Array" />
    }
    

    I added ///<reference path="JScript1.js" to the top of my second script (JScript2.js) and intellisense was available.
    I moved the file to a different folder, lost intellisense and then updated the path to be the relative path ///<reference path="../Models/JScript1.js" and intellisense was available again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In some scripts I see that they omit writing a closing tag ?> for
I'm working on a some build scripts that I'd like to depend on only
I'm writing a set of PHP scripts that'll be run in some different setups,
I'm going into writing some crawlers for a web-site, the idea is that the
I've been writing output from perl scripts to files for some time using code
I'm interested in writing some Chrome compatible Greasemonkey scripts, but I'm finding that there
I'm writing a parser for the Netscreen firewall configuration files to create some scripts
I'm writing some code that will get executed before the DOM loads, basically, using
I'm writing some scripts that are using the HTML 5 file API in FireFox
I'm writing some unix-style Ruby scripts that take option flags. Normally, I write a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.