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 283445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:22:27+00:00 2026-05-12T05:22:27+00:00

Before, I had this: <head> <script src=/Scripts/jquery-1.3.2.min.js type=text/javascript></script> <script type=text/javascript> var optPrompt = –

  • 0

Before, I had this:

<head>
    <script src="/Scripts/jquery-1.3.2.min.js" type="text/javascript"></script> 
    <script type="text/javascript">
        var optPrompt = "- Select One -";
        var subCats;
        var parentCats;
        var nextBtn;

        var ParentChanged = function() {
            ClearDescription();

            if (this.selectedIndex == 0) {
                $(subCats).html($("<option>").text(optPrompt));
            }


            $.getJSON('<%=Url.Action("GetChildCategories") %>', { parentId: $(this).val() },
                    function(data) {
                        subCats.options.length = 0;
                        $("<option>").text(optPrompt).appendTo(subCats);
                        $(data).each(function() {
                            $("<option>").attr("value", this.ID).text(this.Name).appendTo(subCats);
                        });
                    });
        }

        var DisplayDescription = function(catId) {
            $.ajax({
                url: '<%=Url.Action("GetDescription") %>',
                data: { categoryId: catId },
                dataType: 'html',
                success: function(data) {
                    $("p#categoryDescription").html(data);
                }
            });
        }

        var ChildChanged = function() {
            var catSelected = this.selectedIndex != 0;

            if (!catSelected) ClearDescription();
            else DisplayDescription($(this).val());
        }

        var ClearDescription = function() {
            $("p#categoryDescription").html('');
        }

        $(function() {
            parentCats = $("select#Category").get(0);
            subCats = $("select#Subcategory").get(0);
            nextBtn = $("input#nextButton").get(0);

            $(parentCats).change(ParentChanged);
            $(subCats).change(ChildChanged);
        });

    </script> 
</head>

Then I put all of my inline script into a file (myScript.js) and changed my HTML to this:

<head>
    <script src="/Scripts/jquery-1.3.2.min.js" type="text/javascript"></script> 
    <script src="/Scripts/myScript.js" type="text/javascript"></script> 
</head> 

And now nothing is working. I opened up my page in IE7 and it had a page error that read:

Line: 54
Error: Unknown name.

Line 54 happens to be the last line of my external javascript file.

What am I doing wrong?

  • 1 1 Answer
  • 1 View
  • 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-12T05:22:27+00:00Added an answer on May 12, 2026 at 5:22 am

    Am I right in saying that this is ASP.Net? If it is, inline scripts like:

    <%=Url.Action("GetDescription") %>
    

    cannot go in the external JavaScript file.

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

Sidebar

Related Questions

I thought I had my head around this... Had it working many times before.
I had this problem before and can't for life of me remember how to
Strangely I had this working before but I reinstalled my system, upgraded to w7
Has anyone had this unusual(recurring) experience before? I'm trying to check out the project
I had never had this error before, and I didn't move any file, or
I've never had this issue before, so I'm somewhat lost. I'm getting two different
I know I've had this problem before so I'm really frustrated. I've got the
I've ran into trouble with SOAP, I've never had this issue before and can't
Ok I have this problem that I've never had before, it's really bugging me.
This is a suggested re-up on a question I had before. Its really and

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.