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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:19:47+00:00 2026-05-27T01:19:47+00:00

I have a mobile site where I am using JavaScript to refresh a message

  • 0

I have a mobile site where I am using JavaScript to refresh a message counter, JavaScript is enabled but it does not update the counter. The phone I am testing on is a Nokia e90. the other test phone is an HTC innovation and it works perfect on there.

Is it a issue of the JavaScript version on the e90 is out of date?

Here is my JS:

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<title><?php echo TITLE_HOME;?></title>
<meta http-equiv="content-language" content="en" />
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript" src="include/js/jquery-1.3.2.min.js"></script>

    <!-- like this-->
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0b2.min.css" />  
    <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0b2.min.js"></script>


  <script>
    $(document).ready(function()
    {
        refresh();
    });

    function refresh()
    {      
        $.get('newMessageCnt.php', function (cnt) {
        $("#msgcntDiv").html("You have " + cnt);
        //console.log(cnt);
        //$("#msgcntDiv").text("You have " + cnt);
        window.setTimeout(refresh,30000);
        });   
    }   
 </script>

and the php:

<?php
if ($numOfMessages <> 0)
{
    echo "<span class='headings_sub' id='msgcntDiv'>You have " .$numOfMessages . "</span>";
    echo "<a class='red_link' href='".ADDRESS."messages.php'> unopened Messages</a>";
}
else
{
     echo "<span class='headings_sub'>You have no new messages</span>";
}
?>

on the HTC $numOfMessages updates without a blink. On the E90 nothing happens

  • 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-27T01:19:48+00:00Added an answer on May 27, 2026 at 1:19 am

    Try and add the id to the else echo statement

    else {
     echo "<span class='headings_sub' id='msgcntDiv'>You have no new messages</span>";
    }
    

    If you start with 0 messages then if other messages come you won’t have a span id to update the text.

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

Sidebar

Related Questions

I am developing a site for mob using jquery mobile. I have a content
I have a mobile app that is using LinqToDatasets to update/insert into a SQL
Does every j2me enabled mobile have GPS service so that the developer can locate
I have simple jQuery Mobile site created using asp.net mvc 2 and uses basic
I have a form on my jquery-mobile/modernizr site. I'm using 1.1.0-rc.1 of jquery-mobile. I
I'm developing a mobile site for iPhone using jQuery. I have a hidden div
I have an issue with the footer of a mobile site built using jQuery
I have a mobile site and I'd like to redirect users to the domain.mobi
I have a mobile site running with jQuery Mobile. I want to have standard
I have a public desktop site, a public mobile site, and a private intranet

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.