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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:09:10+00:00 2026-06-14T09:09:10+00:00

Possible Duplicate: Update a Select Box on Parent Page from FancyBox2 I’m trying to

  • 0

Possible Duplicate:
Update a Select Box on Parent Page from FancyBox2

I’m trying to update an element on my site from a fancybox. In the fancybox I do a $.post() and get back html data that aI want to populate in a div on my page. I’m opening the fancybox in ajax. I can see in firebug that my script is returning the html but the select box on the parent page is not updating. Can anyone help me with the proper way to do that? I’m currently trying from the fancybox:

$("#send-message").click(function () {
      $(this).closest('form').submit(function () {
          return false;
      });
      var frm = $(this).closest('form');
      if ($(frm).valid()) {
          $("#ajax-loading").show();
          var data = $(frm).serialize();
          $(frm).find('textarea,select,input').attr('disabled', 'disabled');
          $.post("../forms/company_add.php",
          data,

          function (data) {
              if (data.success) {
                  $('#companyselect', $(parent.document)).html(data.success);
                  parent.$.fancybox.close();
              } else {
                  $("#ajax-loading").hide();
                  $(frm).find('textarea,select,input').removeAttr('disabled');
                  $("#send_message_frm").append(data.error);
              }
          }, "json"

          );
      }
  });

I’m using fancybox-2 and php. Thx!

  • 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-14T09:09:11+00:00Added an answer on June 14, 2026 at 9:09 am

    I think you just need to use the id of the element

    $('#companyselect').html(data.success);
    $.fancybox.close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How do I programatically set the value of a select box element
Possible Duplicate: C# Update Table using SqlCommand.Parameters I'm trying to update an SQL Server
Possible Duplicate: SQL - how to SELECT multiple tables and JOIN multiple rows from
Possible Duplicate: Data not writing out to Database I'm trying to update a bit
Possible Duplicate: SQL Delete: can't specify target table for update in FROM clause I
Possible Duplicate: Use LINQ to read all nodes from XML I am trying to
Possible Duplicate: C++ STL set update is tedious: I can't change an element in
Possible Duplicate: Update row with data from another row in the same table I
Possible Duplicate: “INSERT IGNORE” vs “INSERT … ON DUPLICATE KEY UPDATE” Hello peoples $sql1=SELECT
Possible Duplicate: MYSQL COUNT GROUP BY question $query = SELECT * FROM product_id_1; $result

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.