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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:26:06+00:00 2026-06-18T17:26:06+00:00

I am using JQuery to invoke a jsp page using Ajax. It works fine

  • 0

I am using JQuery to invoke a jsp page using Ajax. It works fine when I put just a DateTime in the JSP and the Ajax call is able to show the content of this JSP i.e. DateTime but when I put the Ad code inside the same JSP which was displaying DateTime, I get a page which just only displays the Ad and rest of the content goes away.

I want the Ad to be displayed at a specific location of the page using an Ajax call if the user changes the certain field from a page e.g. the price.

Below is my requirement:
PageA.jsp —> Ajax call is invoked if the user changes the price inside a text box from PageA.jsp page using JQUery or any JavaScript Framework—> AdCall.jsp page is loaded at a certain div at page PageA.jsp.

Below is the code I am using:

   function makeAnAdCall(field) {

  $.ajax({
        url : "AdCall.jsp",
        success : function (data) {
        $("#content").html(data);
        }
    });
}

This is the area where I am displaying the Ad:

<div id="content" style="color:blue;font:bold 14px arial;padding-top:140px;"> Here!
        </div>

One of the reason why it is showing just an ad could be because the ad is trying to write the full document write object instead of just writing the specific area. But I am sure there got to be work around for it 🙂 Any suggestion?

  • 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-18T17:26:08+00:00Added an answer on June 18, 2026 at 5:26 pm

    I was able to solve this problem by using the writeCapture JavaScript framework. The framework has plugin for JQuery but it can be used without JQuery as well. The only change you have to do is instead of calling the JQuery $("#content").html(data); use $('#content').writeCapture().html(data);

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

Sidebar

Related Questions

I am trying to invoke webservice using jquery ajax call. I am using jasonp
I am using jquery ajax method on my aspx page,which will invoke the webmethod
I am using jQuery to invoke page methods for my AJAX calls using $.Ajax.
I'm using the jQueryify bookmarklet on a page so that I can call jQuery
I'm using cakephp 2.1 just fine; I want to use jquery to have my
I'm using a simple url.page#hash style url, and using jquery to invoke a scroll
I was trying to invoke a webservice from phonegap android app using jQuery .ajax
I have a demo using jQuery ajax to invoke web service,at the same time,another
Using jquery 1.7.1, I'm using json to populate the dropdown. The code works just
I am designing webpage using jquery and php. My page has side menu, and

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.