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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:31:53+00:00 2026-05-24T13:31:53+00:00

I have a scriptlet in the ASPX page as below. When I browse to

  • 0

I have a scriptlet in the ASPX page as below. When I browse to this page, the script debugger appears saying “Micosoft JScript runtime error: Object expected”. I marked line with //<–error here. I removed everything and only left $(function(){}); It still complained about Object Expected. Do you know why? Thanks.

<fieldset>
    <button id="Case5" name = "Case5" class="wizard" title="click here to select the case">
    Case 5 - AAA </button><br />
    <button id="Case6" name = "Case6" class="wizard" title="click here to select the case">
    Case 6 - BBB </button><br />
</fieldset>

<script language="javascript" type="text/javascript">
$(function () { //<--error here
    (":button").click(function () {
        appendSelection(this);
    });
});

function appendSelection(btn) {
    //ToDo: append the selected value to the hyperlink

    var caseNumber = btn.id;
    switch (caseNumber) {
       ....
    }
}

In the Site.Master the script libraries are

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/i18n/jquery-ui-i18n.min.js" type="text/javascript"></script>
<script src="http://jquery-ui.googlecode.com/svn/tags/latest/external/jquery.bgiframe-2.1.1.js" type="text/javascript"></script>


<script src="<%: Url.Content("~/Scripts/ui/jquery.ui.datepicker.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/datetimepicker_css.js") %>" type="text/javascript" ></script>
<script src="<%: Url.Content("~/Scripts/lang/calendar-en.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/json2.js") %>" type="text/javascript"></script>
<script type="text/javascript">var appRoot =  '<%:Url.Content("~/")%>'</script>
<script src="<%: Url.Content("~/Scripts/MyApp.js") %>" type="text/javascript"></script>
  • 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-24T13:31:53+00:00Added an answer on May 24, 2026 at 1:31 pm

    I think your issue is that you have a minor issue in your javascript and need to use the ‘$’ to invoke jQuery in your selector.

    This:

    (":button").click(function () {
        appendSelection(this);
    });
    

    Needs to use jQuery for the selector as this:

    $(":button").click(function () {
        appendSelection(this);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following scriptlet inside a JSP page. File f = new File(//WEB-INF//music//rock//Evanascence//Fallen//text.txt);
Is it possible to access struts2 variable in jsp scriptlet? If I have struts2
Have you ever seen any of there error messages? -- SQL Server 2000 Could
I have a huge ASPX web form which has around 100 fields which need
here is my problem: I have a script (let's call it comet.php) whic is
I have a bash-script (let's call it /usr/bin/bosh ) using the following she-bang line:
I'm trying to solve the following problem: Say I have a Python script (let's
I have a JSP page on which I have a div tag in which
Am trying to get the application context in my JSP page. I have the
I am having script errors of Error expected ')' in IE when attempting to

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.