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

  • Home
  • SEARCH
  • 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 8662131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:39:38+00:00 2026-06-12T16:39:38+00:00

I am working on a page where i need to refresh certain div of

  • 0

I am working on a page where i need to refresh certain div of parent window and here is my use case

  1. User click on add to cart button and a pop-up will come with added product details.
  2. I am calling a java-script method defined in a JS file which is included in parent window.

from that function i am calling a ajax call and want to replace that div content from the content being sent from the server using ajax call and here is the method

function updateAllotmentQtySection(){

 if($('#isProductAllotment').length > 0){
 var allotmentEntryCode=$("#allotmentEntryCode").val();
 var productcode=$("#productCodePost").val();
 $.ajax({
        type: "GET",
         url: "/storefront/cart/getProductedAllotment/?productCode="+productcode+"&allotmentEntryCode="+allotmentEntryCode,
        success: function(response) {
         //alert(response);
            $("#productAllotmentQtyDiv").html(response);
         }
    });

  }

Here is the Div section which i am trying to update

<div id="productAllotmentQtyDiv">
 <c:choose>
    <c:when test="${not empty productAllotment}">

        <select name="qty" id="qty" class="productDetailsSelect">
          <c:forEach items="${productAllotmentQty}" var="productAllotmentQty">
              <option value="${productAllotmentQty}">${productAllotmentQty}</option>
          </c:forEach>
        </select>

       <input type="hidden" name="allotmentEntryCode" id="allotmentEntryCode" value="${productAllotment.code}" />
       <input type="hidden" name="isProductAllotment" id="isProductAllotment" value="true"/>

    </c:when>

   <c:otherwise>

    <c:when test="${not empty editPersonalization}">
     <input style="width: 46px;" type="text" size="1" id="qty"
      name="qty" value="${quantity}" readonly="readonly" />
    </c:when>
    <c:otherwise>
     <input style="width: 46px;" type="text" size="1" id="qty"
      name="qty" value="${quantity}" />
    </c:otherwise>
   </c:otherwise>
    </c:choose>
    </div>

I am sending the same content from the server which i inside the div and even i am able to see the correct response under the alert tag but not sure where exactly is wrong part as the div is not getting updated but only showing the previous values

  • 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-12T16:39:38+00:00Added an answer on June 12, 2026 at 4:39 pm

    Use window.opener to call a function in the parent’s context from the child:

    window.opener.updateAllotmentQtySection();
    

    (assuming updateAllotmentQtySection() exists in the global namespace in the parent)

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

Sidebar

Related Questions

I'm working on a page where I need to associate a list of objects
I'm working on a sharepoint page and I need to target the top menu
I am working on an HTML page where i need to send confirmation by
i am working a on a permission system. In each page it will need
I'm working on a FBML fan page for a client. I need to perform
Here is my working page . I attached buttons to white bishop and you
What I have here is a PHP page working with the Facebook API. What
I am working on a page in ASP.NET/C# where the user's information is saved
I'm working on a div (parent) that has two other divs (menu and content)
I need to be able to swap a background image on page refresh. I

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.