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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:52:48+00:00 2026-06-14T16:52:48+00:00

i want to Post a form value with Jquery $.POST() and load a specific

  • 0

i want to Post a form value with Jquery $.POST() and load a specific selector i don’t know how to do it may be with json or something like that

$.post('topic.php', {
    id: id
}, function(data) {
    $("#message")
        .html($(data).('attr', 'title'))
        .hide()
        .slideDown(500); //Fade in the data given by the topic.php file
});
return false;
});​

i just want to load the title and description not the whole page

i want to retrieve this title and description in a lightbox how can i do it?

  • 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-06-14T16:52:49+00:00Added an answer on June 14, 2026 at 4:52 pm

    First, jQuery (and even many browsers internally) sends a HTTP_X_REQUESTED_WITH header. You could catch it in topic.php and returns json instead of html. Check this link for an how-to: http://www.electrictoolbox.com/how-to-tell-ajax-request-php/

    If you really want to extract content from returned html, it’s fairly simple: create a blank DOM object with jQuery, give it the HTML data, then retrieve whatever element you want with the find function:

    $.post('topic.php', {
        id: id
    }, function(data) {
    $("#message")
        .html($('<div></div>').html(data).find('a').('attr', 'title'))
        .hide()
        .slideDown(500); //Fade in the data given by the topic.php file
    });
    return false;
    });​
    

    Replace the ‘a’ tag in find function by any selector you need. A working example here:
    http://jsfiddle.net/GeX7d/

    EDIT: for the lightbox part, there are plenty of tutorials on the web that describe the process, this one will fit your needs: http://www.cssjockey.com/web-design-tutorials/an-easy-way-to-create-light-box-with-jquery-css

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

Sidebar

Related Questions

jquery looks like this $.post('JSP/processForm.jsp', $(#Form).serialize(), function(data){ //I want to iterate through every line
I want to make a form like this, and i want to post the
I have a nested json. I want to post it as a form input
i am trying to test jquery post. I am posting a form and want
I would like to post a form using ajax and jquery to a .asmx
I am using Jquery AJAX to post a form on my page. I want
I want to post some values from a simple HTML form, validate them with
I want to ignore the post form in the django's internatonalization. I am using
I want to post a forma poupup window. Problem is, the form posts successfully
I want to build a form_tag that will allow me to post a new

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.