sqlnoob Posted November 23, 2010 Share Posted November 23, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/219626-firefox-doesnt-display-text-in-div/ Share on other sites More sharing options...
sqlnoob Posted November 23, 2010 Author Share Posted November 23, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/219626-firefox-doesnt-display-text-in-div/#findComment-1138678 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.