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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:45:25+00:00 2026-06-15T13:45:25+00:00

When I update a div’s content every 10 seconds, special characters like ÆØÅ become

  • 0

When I update a div’s content every 10 seconds, special characters like ÆØÅ become question marks. What is wrong? Here is my code:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>
<script type="text/javascript">
var auto_refresh = setInterval(
function ()
{
   $('#chat').load('#chat');
}, 10000); // refresh every 10000 milliseconds

</script>
<body>
<div id="chat">
<div class="melding">
        <form action="chat.php?login=<?php echo $bruker; ?>" method="post">
        <table>
        <tr>
            <td><input style="width: 420px;" type="text" name="melding"><input style="
border: 1px solid white;
    background: #333;
    color: white;"type="submit" name="send" value="Send"></td>
        </tr>
        </table>
        </form>
<div style="color: white;">
    <?php
    $print = "SELECT * FROM chat WHERE (fra='$user' AND til='$bruker') OR (fra='$bruker' AND til='$user') ORDER BY id DESC LIMIT 100";

    $resultat = mysql_query($print);

    while($row = mysql_fetch_array($resultat)){ 
echo "<span class='red'>". nl2br(strip_tags($row['fra'])) .":</span> ". nl2br(strip_tags($row['melding'])) ."<br>";
}
?>
</div>
</div>

My code is saved in UTF-8 format

  • 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-15T13:45:26+00:00Added an answer on June 15, 2026 at 1:45 pm

    Add this meta tag to the page:

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    It tells the browser that the characters you provide are encoded in UTF-8.
    Be sure that the other content of the page is also encoded in UTF-8.

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

Sidebar

Related Questions

I'm trying to update contextmenu item if ajax requests alters my div content. Here
I want to update the content of a div in code behind: StringWriter stringWriter
Hey guys quick question, I want to update the contents of a div with
I am using the following code to update a div echo $this->Js->link($station[Company][name], array('action' =>
I'm working in a website were we update the content of a div using
I am trying to update a div's content automatically with this script: function update()
I would like to live update a DIV in the page with the text
Basically I have this code. I am trying to simply update a div but
i have a rails 3.1rc4 app and i would like to update a div
Here's my issue. I have a javascript function that update a div when i

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.