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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:00:47+00:00 2026-05-24T16:00:47+00:00

I want to display a dialog which contains HTML that is dynamically generated: $.ajax({

  • 0

I want to display a dialog which contains HTML that is dynamically generated:

 $.ajax({
        type: "get",
        url: "http://localhost/example/test",
        dataType: "html",
        success: function (content) {
            $(content).dialog();
        }
    });

content is basically a complete HTML site with header and body. If I change $(content).dialog() to alert(content) the generated HTML is displayed correctly. But content.dialog() throws the following exception on Firefox 5:

a.style is undefined 
Source: http://localhost/TrackerWebStable/Scripts/jquery-1.4.4.min.js
Line: 150

I’ve also tested it with IE8 where I get similar errors.

How can I solve this problem?

  • 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-24T16:00:48+00:00Added an answer on May 24, 2026 at 4:00 pm

    content will contain the entire html markup. I believe you want to show some part of it in a dialog. Try to find the required element from the whole html and show it in a dialog.

    Alternatively, you can only send the required markup from "http://localhost/example/test so that you dont have to find anything in the success handler but just show it in the dialog.

    $.ajax({
            type: "get",
            url: "http://localhost/example/test",
            dataType: "html",
            success: function (content) {
                $(content).find("requiredElement").dialog();
            }
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to know that I have the string.xml Resource file which contains status
I want to use XmCreate{Error|Warning|Info}Dialog to display some message in screen in my SDL
i want to use facebook's fb:dialog tag to display a simple pop-up form for
I want to display tabular type data, but it will not be coming from
I am generating a string, which right after generating I want to display a
I have this scenario where I want to display the xml which is coming
I am using a function to display a dialog box that asks the users
I've got a ListView that displays an array that is generated dynamically by the
I have a QDialog inside which I want to display 50 QComboBoxes in a
What I want to do is quite simple : to display a dialog form

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.