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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:56:09+00:00 2026-05-13T05:56:09+00:00

I know jquery/ajax in IE is a common problem. There is a lot of

  • 0

I know jquery/ajax in IE is a common problem. There is a lot of great advice here on stack overflow but none of it has worked for me yet.
The following code works just fine in firefox, but does not in IE:

$.ajaxSetup({ cache: false })
$.ajax({
 url: 'FunDataService.asmx/' + funDataMethod,
 type: 'POST', dataType: 'html', cache: false, timeout: 3000,
 error: function() {alert('Error updating fun information.  Refresh the page and try again.');},
 success: function(htmlFunInfo) {
  alert($(htmlFunInfo).text());
  $("#fundiv").html($(htmlFunInfo).text())},
 data: parameters
});

You can see my anti-caching attempts; I’ve also added random values to the URL. I’ve also tried adding various content headers on the web service:

'        Context.Response.ContentType = "text/html; charset=utf-8"
'        Context.Response.ContentType = "text/html"
Context.Response.ContentType = "text/plain"

The alert command is for debugging of course. In FF, $(htmlFunInfo).text() is the div tags sent down from the server that I wish to insert. In IE, it is empty string.

Does anyone know how to get access to this string value in IE? Thanks!

Edit
The response from the server is like:

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="tempuri.org/">
  <div>stuff</div>
  <div>more stuff</div>
</string>

Increasingly I think that is what’s wrong, that I need to avoid the wrapping around the divs.

Edit 2 That’s it! In my server code, I replaced:

Return RemarkHtml

with

Context.Response.Write(RemarkHtml)

This avoided the tags surrounding the divs, and now I’m good. Still, I think it’s a big problem that in IE, you just can’t get to the contents of tags using .text().

Thanks guys!

  • 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-05-13T05:56:10+00:00Added an answer on May 13, 2026 at 5:56 am

    Instead of

    alert($(htmlFunInfo).text());
    $("#fundiv").html($(htmlFunInfo).text());  
    

    Try

    alert(htmlFunInfo);
    $("#fundiv").html(htmlFunInfo); 
    

    The issue is that calls to .text() and .html() get the text and HTML contents of the selected node(s). It looks like what you want to do here is actually inject the entire response into #fundiv.

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

Sidebar

Related Questions

In jQuery ajax function there is xhr option. Does someone know more details, usability
Ok so I know long hand ajax but trying to use the jQuery short
as we know that in jquery / Ajax we have lot of slide show
I know how to make a jQuery AJAX call from a form, but how
I have a little problem about using jQuery (I really do not know jQuery
I know in jQuery 1.4.x there is a method delay(). We can use it
Does anyone know of a jQuery plugin that has 'helpers' or extensions like those
I know this question has been asked numerous number of times, both here and
before i start of with anything i know that jQuery and Ajax are the
I'm using jQuery.ajax() to make a PUT request to a REST web service, but

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.