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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:52:55+00:00 2026-06-13T02:52:55+00:00

Is it possible to retrieve some (in this case) text with an ajax request

  • 0

Is it possible to retrieve some (in this case) text with an ajax request and modify it before showing it in e.g. a div?

I’ve got the following code

$.ajax({url: "Files/" + par + ".php",
success: function(result){
    $("#box").html(result);
}

Where par is a parameter (for example foo). This would retrieve the file foo.php and place the obtained file contents in a div called box.

Now I wonder if you could do the following:
Suppose the content of foo.php was as followed:

Some title

some text here…

A sub title

more text….

Is it possible to place some code or a sentence between the title and the text?
So the result would be like this:

Some title

This sentence was added
some text here…

A sub title

more text…

  • 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-13T02:52:57+00:00Added an answer on June 13, 2026 at 2:52 am

    Yes, absolutely.

    success: function(result){
        result = result.replace("some text here...", 
            "<i>This sentence was added</i><br />some text here...");
        $("#box").html(result);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently retrieve some printer information about the possible media trays with this code
Is it possible to save some Perl code in a database, retrieve it using
Is it possible to retrieve programmatically all the case of a switch ? I
Hi (sorry for my ugly english) I wonder if this is possible to retrieve
Possible Duplicate: How to retrieve user's current city name? using the following methods i
So, I know that is possible to retrieve some info, like Device name, unique
Possible Duplicate: Retrieve (or simulate) full query from PDO prepared statement I can't figure
Is it possible to retrieve the original message from a SHA-1 encrypted message? If
is it possible to retrieve statistics about the minimal or maximal value of a
is it possible to retrieve by using connection.getschema() the description item from a sql

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.