Jump to content

firefox doesn't display text in div


sqlnoob

Recommended Posts

Hi all, I have a problem with my ajax script. It works fine in IE7 and IE8, but somehow fails in FF3.

 

It supposed to fetch the words "no news" from this page:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>Roma</TITLE>
<META NAME="description" CONTENT="ajax process">
<META NAME="keywords" CONTENT="ajax process">
</HEAD>
<BODY>
<?php

//DATABASE CONNECTION VARIABLES
$myserver ="myserver";
$myname = "myname";
$mypassword = "mypassword";

/*SQL CONNECTION*/
$con = mysql_connect("$myserver","$myname","$mypassword");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
else {

$mydb ="shugonl";

//DATABASE SELECTION
$selector = mysql_select_db($mydb, $con);
if (!$selector)
{
  die('Could not select database: ' . mysql_error());
}
else {

/*COUNTING NEWS*/
$cresultnews = mysql_query("SELECT COUNT(*) AS newscount FROM news");
$crownews = mysql_fetch_array($cresultnews);
$newsbank = $crownews[newscount];

if ($newsbank <1)
  {
  $response = "No news";
  }
else
  {
/*FETCHING NEWS*/
$mresultnews = mysql_query("SELECT MAX(newsID) AS latest FROM news WHERE newscat ='1'");
$mrownews = mysql_fetch_array($mresultnews);
$newsid = $mrownews[latest];

$resultnews = mysql_query("SELECT * FROM news WHERE newsID ='$newsid'");
$rownews = mysql_fetch_array($resultnews);
$newstitle = $rownews['newstitle'];
$newsdate = $rownews['newsdate'];
  
  
  $response ="<I>".$newsdate."</I> ".$newstitle;
  }

//END DATABASE SELECTOR
}
}

/*output response*/
echo $response;

mysql_close($con);
?> 
</BODY>
</HTML>

 

and then display the words "no news" at this page:

http://www.shugo.nl/rome/index.htm

 

when you hover your mouse over the "News" head. Like I said it works fine with IE, but fails with FF. Apparently this is something that FF doesn't support, or I am doing something wrong. Does anyone have a solution to my problem? If so please share your solution with me.

 

thanks again for your help

Link to comment
https://forums.phpfreaks.com/topic/219626-firefox-doesnt-display-text-in-div/
Share on other sites

uhm sorry the title is a bit misleading I think, it supposed to display it in a <P> namely: <P id="ticker" class="ticker"></P>

 

my apologies for that

 

but i also tried it with just DIV on another page and it's not working in FF there either...

 

so again what am I doing wrong? and what work around method  is there to solve this problem? (preferable an easy and simple solution as unlike php, javascript is not really my strength)

 

I don't want to use textfields as that would look ugly, but there has got to be something, right? I mean support of features in FF can't be really that bad, right?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.