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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:45:10+00:00 2026-06-08T07:45:10+00:00

I dont know this may be duplicate but, I use ajax in my website,

  • 0

I dont know this may be duplicate but,

I use ajax in my website, now in response to that call i send some html and script.

Then I replace that data with some of my element exist in page.

Now, I want to make second ajax call so I have removed html content from loaded div. Then again ajax call return some other html code and script. But Some times it is conflict between previous script and newly arrived script.

EX.
1st response I replace html and script with some element: $('.ma_right_main').html(response.data);

then before 2nd call I remove content:
$('.ma_right_main').html('');

2nd response I replace html and script with some element: $('.ma_right_main').html(response.data);

but after replace it 2nd time script returned from first time still there in execution. I want to remove it just like how I can remove html content.

  • 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-08T07:45:11+00:00Added an answer on June 8, 2026 at 7:45 am

    I don’t think once a browser has loaded a script that it can be removed (this doesn’t mean you can’t remove it from the dom, but it would still exist.) For example if you had a script with variable x, load the page so the script gets loaded, remove the script from the dom, x I think would still be defined.

    There are ways around this though, if each dynamically loaded script was its own object, when “unloading” you could set the object to null. This is a solution I came across a while back when looking for a similar solution.

    Found the reference I was referring to: https://stackoverflow.com/a/1346903/1475461

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

Sidebar

Related Questions

This may be a duplicate question, but really don't know how else to word
I know this may be an easy answer to some of you but i
I know this question may be possible duplicate of many others questions but there
This may not be a programming question, but I don't know where to ask
I dont know how doable this is but I'm working on a datatype for
i dont know if i should be asking this here (im now thinking maybe
I have a website that is working properly.I dont know when I do Domain-name.com/images
I dont know if this is a great idea...or a crap one. But I
First, I know my question would be possibly duplicate of this one , but
hey guys i know this may sound stupid, but i am stuck with this

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.