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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:07:22+00:00 2026-06-05T05:07:22+00:00

When I use a script for getting the content from a specific url using

  • 0

When I use a script for getting the content from a specific url using ajax, my HTML content is not displayed, i.e my table element is not displayed: I get the data from the specif url and I am showing it in an alert box, and also using document.write to write on the page the data coming from the url I called:

<head>
  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.css" />
  <script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
  <script src="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.js"></script>
  <script type="text/javascript">
  $(document).ready(function() {
    $.ajax({
      type:"POST",
      url:"http://your url",
      success: onSuccess,
      error:onError
    });
  });
  function onSuccess(data){
    var servertext=data;
    document.write(servertext);
    alert(servertext);
  }
  function onError(data){
    alert(data+'error');
  }
  </script>
</head>
<body>
  <p> hello</p>
  <table height="150px" weight="150px" border="1px">
  <tr>
    <td><img src="green.png" height="100px" width="100px" /></td>
  </tr>
</table>

enter code here

  • 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-05T05:07:24+00:00Added an answer on June 5, 2026 at 5:07 am

    document.write shouldn’t be used after the page has finished loading. If you call it, it will implicitly call document.open, which blanks the page and creates a new document.

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

Sidebar

Related Questions

I use this script: $(document).ready(function() { $page = jQuery.url.attr(file); alert(page); }); but I get
I am having trouble getting my content script request values from my background script.
I am trying to use jquery ajax to get data from a php file.
Getting an error when i use the following script to show a div when
I use this script to call a javascript from codebehind. ClientScript.RegisterStartupScript(this.GetType(), Exist, <script language='javascript'>ConfirmRedirect('
I have a Classic ASP script that outputs an HTML table as an XLS
In my application,I am using more than html page for displaying the content and
I have a script to extract certain data from a much bigger table, with
I have the following script element in my web page: <script src=default.js type=text/javascript></script> Using
script that changes description of a track. I'm getting 404 error. Token and url

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.