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

  • Home
  • SEARCH
  • 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 3301808
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:47:18+00:00 2026-05-17T20:47:18+00:00

I just started experimenting with jqModal and am having a strange issue. The modal

  • 0

I just started experimenting with jqModal and am having a strange issue.

The modal window is displayed correctly however I get a javascript error when I click anywhere inside it. When I look at the offending line of code, it turns out that jqModal is trying to run my entire page as if it were one big piece of javascript.

Since I wrote this post, I discovered that the code works fine in FireFox. The issue is IE of course.

My markup:

<script type="text/javascript">

    $(document).ready(function () {

        $('#jqmWindowContainer').jqm({ 
            modal: true,
            ajax: '<%: Url.Action("Save", "AssetSearch") %>',
            onHide: myAddClose
        });

        function myAddClose(hash) {
            hash.w.fadeOut('300', function () { hash.o.remove(); });
        }

    }); 

    </script> 


<a href="#" class="jqModal display-field-right">Save this search</a>  
<span id="jqmWindowContainer" class="jqmWindow">  
</span> 

Modal window markup:

<div id="modalWindow" class="jqmWindow">  

    <% using (Ajax.BeginForm("Save", "AssetSearch", new AjaxOptions() { HttpMethod = "Post", InsertionMode = InsertionMode.Replace, UpdateTargetId = "modalWindow" }))
                {%>

                <!-- Validation summary -->
                <div class="validation-summary">
                    <%=ViewData["Message"]%>
                </div>

                    <%=Html.LabelFor(x => x.Name)%> 
                    <%=Html.TextBoxFor(x => x.Name)%> 


                <!-- Submit button -->
                <div class="submit-form">
                    <input type="submit" value="Save" /> 
                </div>
                <%
                }%>

</div>

<a class="jqmClose" href="#">Close</a> 

Clicking on the “Save this search” link correctly displays the modal window. Clicking anywhere in the modal, causes this error:

Line: 5 Error: Object doesn’t support
this property or method

When I look at the code it’s trying to execute, it turns out to be my whole page which of course triggers an error:

alt text

I have no clue what would cause this behavior. If I continue past the error, the window works correctly and my action method gets called when I click Save.
Help!

Thanks!

Rick

  • 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-17T20:47:19+00:00Added an answer on May 17, 2026 at 8:47 pm

    Which versions of jQuery and jqModal you use?

    If you use jQuery 1.4.x you should verify whether the jqModal.js contain $() (for example {$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);} in jqModal.js). This can not be used together with jQuery 1.4.x. To fix the problem replace $() to $(document).

    UPDATED: After you post the link to site having the problem I could analyse the problem. If one clicks on “Save this Search” it will be loaded the div from http://camp.matrix6.com/matrix6studios/AssetSearch/Save?randomId=332557. The results will be used as a dialog div for jqModal. Currently the div looks as following:

    <div class="jqmPopupForm" id="jqmPopupForm">
        <div id="loadingMessage" style="display: none;">
            Saving...
        </div>
        <form action="/matrix6studios/AssetSearch/Save"
              method="post"
              onclick="Sys.Mvc.AsyncForm.handleClick(this, new Sys.UI.DomEvent(event));"
              onsubmit="Sys.Mvc.AsyncForm.handleSubmit(this, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, httpMethod: &#39;Post&#39;, loadingElementId: &#39;loadingMessage&#39;, updateTargetId: &#39;jqmPopupForm&#39; });">
        <div class="sign-in-validation-summary">
        </div>
        <fieldset>
            <legend>Save Your Search</legend>
            <ol>
                <li>
                    <label for="Name">
                        Name</label>
                    <input id="Text1" name="Name" type="text" value="" />
                </li>
            </ol>
        </fieldset>
        <fieldset class="submit">
            <input type="submit" value="Save" />
        </fieldset>
        </form>
    </div>
    <a class="jqmClose" href="#">Close</a>
    

    How one can see the form element has onclick and onsubmit attributes which produce at the end the error. If you click inside of the form, you see the error because “Sys.Mvc.AsyncForm.handleClick(this, new Sys.UI.DomEvent(event));” could not be called. How you can see in http://ajax.microsoft.com/ajax/mvc/1.0/MicrosoftMvcAjax.debug.js (uncompressed version of the http://ajax.microsoft.com/ajax/mvc/1.0/MicrosoftMvcAjax.js which you use) it has Sys.Mvc.AsyncForm.handleSubmit but no Sys.Mvc.AsyncForm.handleClick function. It would be easy if you will use the MicrosoftMvcAjax.js from your current MVC project (probably MVC 2.0) because on the Microsoft Ajax CDN you would not find MVC 2.0. More better would be create the dialog with respect of jQuery only without any MVC controls.

    It is the main error, but there are some other small problems in your code. For example you should remove comma before ‘}’ from the following code fragment

    <script type="text/javascript">
        $(function () {
            $("#accordion").accordion({
                event: "mouseover",
                alwaysOpen: false,
                autoHeight:false,
                navigation: true,
            });
        });
    </script>
    

    Next problem is: your code has two elements having id=”jqmWindowContainer”.

    Your code has lines

    <link rel="stylesheet" type="text/css" media="screen"
          href="http://camp.matrix6.com/content/css/jqModal.css" />
    <script type="text/javascript"
            src="http://camp.matrix6.com/Content/js/jqModal.js"></script>
    

    in the middle of the HTML code. It is not allowed. The <link> element should be moved inside of the <head>. Moreover you include the code with <link href=".../jqModal.css"> and <script src=".../jqModal.js"></script> twice on one page which is also very bad. You should not load jqModal.js twice on the same page. If you move the code to the <head> you can place it only once.

    I can continue with less important errors to hold XHTML 1.0 Strict which you use. For example you should place <fieldset> elements inside of <form> and <ul> over <li> and so on. I recommend you validate your page in http://validator.w3.org/.

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

Sidebar

Related Questions

I just started experimenting with Aptana Jaxer server side javascript engine for my next
I just started experimenting with java today (have experience with javascript and PHP) and
Hi I've just started experimenting with .live and .die and having some great results
I've just started experimenting with SDL in C++, and I thought checking for memory
I just started experimenting with Threads and I ran in to a problem I'm
I just started experimenting with a new technique I name (for the moment at
I've just started experimenting something with Matlab, and since I'm used to Vim's interface,
I've just started experimenting with WPF templates vs. styles and I'm not sure what
I'm using a PowerPC 750 and have just started experimenting with the external interrupt.
I just started experimenting cuda with the following cude #include macro.hpp #include <algorithm> #include

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.