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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:20:59+00:00 2026-05-23T01:20:59+00:00

I would like to show blog details when a link is clicked. Here is

  • 0

I would like to show blog details when a link is clicked.

Here is part of the code I have.

“.ajax” part

    $.ajax({
        url: 'someurl',
        dataType: 'json',

        success: function( response ) {
            $( '#viewDialog > h1' ).html( response.title );
            $( '#viewDialog > p' ).html( response.content );

            $( '#viewDialog' ).dialog( 'open' );
        }
    });

“.html” part

<div id="viewDialog" title="My Blog">
    <h1></h1>
    <p></p>
</div>

I am pretty sure I get the response from the server in the right json format.
Something like this
{"id":"120","title":"My new stuff","content":"Someting new","author_id":"11"}

When I clicked the link, the dialog window poped up but no information was shown in the window.

Did I do everything right?

Milo

  • 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-23T01:20:59+00:00Added an answer on May 23, 2026 at 1:20 am

    You have no element with an ID of blogDetail in the HTML you provided.

    Edit after question update:

    Passing 'open' into the dialog call will only work if the dialog was previously created.

    Placing $( '#viewDialog' ).dialog({autoOpen:false}); at the top of your jQuery script should make this work.

    Or you could simply remove the ‘open’ parameter and just call $( '#viewDialog' ).dialog();

    Demo using { autoOpen : false }

    Demo without Passing ‘open’

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

Sidebar

Related Questions

I have an author page in my Wordpress blog but I also would like
I would like to use the universal code and have ran into difficulties getting
I would like to configure my Octopress blog to add an author link in
I'm writing blog posts for my company blog and I would like code snippets
I would like to show the value of a variable in a TextView, like
I would like to show and hide a div during hover and hover out.
I would like to show a div based on the Onclick event of an
I would like to show divs at a specific interval (10 seconds) and show
I would like to show different tabs in the top navigation of a SharePoint
I would like to Show my Messagebox in the center of its parent 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.