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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:49:57+00:00 2026-05-22T01:49:57+00:00

I am using Loading a partial view in jquery.dialog as a reference in order

  • 0

I am using Loading a partial view in jquery.dialog as a reference in order to open some partial views inside a dialog box. This has worked for me a few times, but now that I’m trying to use the same exact setup, it just doesn’t work…

I have two issues I’d like to ask about…

The dialog box opens, then once it opens, the page gets redirected to called ActionMethod which is returning the Partial View. So I end up with an un-styled page that displays the correct info. Here’s the code:

    public ActionResult Compare()
        {
            var user = _helper.GetUserFromSession(HttpContext.User.Identity.Name);
            var items = user.WatchList.ToList();
            var viewModel = Mapper.Map<IList<Item>, List<IndexItem>>(items);
            return PartialView(viewModel);
        }

And here’s the jQuery code:

        $('#compareItemsDialog').dialog({
            autoOpen: false,
            width: 850,
            height: 600,
            draggable: false,
            dialogClass: "compareDialog",
            title: 'Compare',
            open: function (event, ui) {
                $(this).load("/WatchList/Compare");
            }
        });
        $('#watchListCompareLink').click(function () {
            $('#compareItemsDialog').dialog('open');
        });

I just do not see why this is causing problems… I’ve got other partial views that are setup exactly the same, yet they are working perfectly!

UPDATE: The above has been resolved. Now I just need an answer to the problem explained below…

How do I pass custom options/data along with the call to the dialog? I am thinking maybe I could do something like $('#compareItemsDialog').dialog('open', { id = someVar }); So is that even possible?

  • 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-22T01:49:58+00:00Added an answer on May 22, 2026 at 1:49 am

    Question: How do I pass custom options/data
    along with the call to the dialog?

    Instead of calling the jQuery dialog directly, wrap this functionality in you own custom javascript function that accepts your custom data. Then have your javascript branching logic in there.

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

Sidebar

Related Questions

I am using @Darin Dimitrov's method explained in Loading a partial view in jquery.dialog
I am updating a div with a partial view by using something like this:
I have a situation where I'm loading some content using a URLLoader but the
I hope you can help me with this. I've been using jquery datepicker in
So I'm loading a partialview using an ajax actionlink, but need to embed some
So I'm rendering a partial view in memory in order to direct the XSL-FO
not sure how to word this correctly.. so i have a view which has
I'm using lazy loading images based on this question . I'm implementing a search
I'm loading data into a DataSet from an XML file using the ReadXml method.
I am loading JSON data to my page and using appendTo() but I am

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.