jushiro Posted October 15, 2011 Share Posted October 15, 2011 Were having a problem in coding in jquery.. its working perfectly in Chrome.. pls look at my code, its not working in mozilla and i dont know why.. This is my code.. <?php session_start(); ?> <?php include('../MOWS/Connections/Config.php'); ?> <?php if (isset($_SESSION["Username"]) && isset($_SESSION["accesstype"])) { $Email = $_SESSION["Username"]; $accesstype = $_SESSION["accesstype"]; } else { $accesstype = "3"; } if ($accesstype == "3") { header('Location:../MOWS/Login/Login_Index.php'); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Welcome</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link rel="stylesheet" href="Slider/css/style.css" type="Slider/text/css" media="screen" charset="utf-8" /> <script type="text/javascript" src="Slider/js/jquery-1.2.6.js"></script> <script type="text/javascript" src="Slider/js/startstop-slider.js"></script> <link rel="stylesheet" type="superfish/text/css" href="superfish/css/superfish.css" media="screen"> <script type="superfish/text/javascript" src="superfish/js/jquery-1.2.6.min.js"></script> <script type="superfish/text/javascript" src="superfish/js/hoverIntent.js"></script> <script type="superfish/text/javascript" src="superfish/js/superfish.js"></script> <script type="superfish/text/javascript"> jQuery(function(){ jQuery('ul.sf-menu').superfish(); }); </script> <link rel="stylesheet" href="Navi/css/style.css" type="Navi/text/css" charset="utf-8"/> <script type="text/javascript" src="Navi/jquery-1.3.2.js"></script> <script type="text/javascript"> $(function() { var d=300; $('#navigation a').each(function(){ $(this).stop().animate({ 'marginTop':'-80px' },d+=150); }); $('#navigation > li').hover( function () { $('a',$(this)).stop().animate({ 'marginTop':'-2px' },200); }, function () { $('a',$(this)).stop().animate({ 'marginTop':'-80px' },200); } ); }); </script> <style type="text/css"> <!-- body { background-color: #000025; background-repeat: repeat-x; } .header { width:600px; height:56px; position:absolute; top:50%; left:10px; background:#fff url(title.png) no-repeat center; } a.back{ width:256px; height:73px; position:absolute; bottom:15px; right:15px; background:#fff url(codrops_back.png) no-repeat center; } a.dry{ position:absolute; bottom:15px; left:15px; text-align:left; font-size:12px; color:#ccc; text-transform:uppercase; text-decoration:none; } --> </style> <link href="Slider/CSS/layout.css" rel="stylesheet" type="text/css" /> <link href="/MOWS/MOWS/CSS/layout.css" rel="stylesheet" type="text/css" /> <style type="text/css"> a:link { color: #FFF; } a:visited { color: #FFF; } a:hover { color: #000; } a:active { color: #999; } </style> </head> <body> <div class="header"> <p align="right"><a href="/MOWS/MOWS/Login/Login_Logout.php">Logout</a></p> </div> <div class="content" id="page-wrap"> <div align="center"> <ul class="sf-menu"> <li> <a href="../MOWS/Pagecheck/homecheck.php">Home</a> </li> <li class="current"> <ul> <li> <a href="#aa">Mabalacat</a> </li> <li class="current"> <a href="#ab">Officials</a> </li> </ul> </li> <li> <a href="../MOWS/Pagecheck/departmentcheck.php">Deparment</a> </li> <li> <a href="../MOWS/Pagecheck/officialcheck.php">Officials</a> </li> </li> <li> <a href="../MOWS/Pagecheck/locationcheck.php">Locations</a> </li> <li> <a href="../MOWS/Pagecheck/announcementcheck.php">Announcement</a> </li> <li> <a href="../MOWS/Pagecheck/eventscheck.php">Event</a> </li> <li> <a href="../MOWS/Pagecheck/hotlinescheck.php">Hot Lines</a> </li> <li> <a href="../MOWS/Pagecheck/aboutuscheck.php">About us</a> </li> </ul> <br> </div> <div id="slider"> <div id="mover"> <div id="slide-1" class="slide"> <h1>MABALACAT Municipality </h1> <p> Mabalacat is a 1st Class Municipality vying to become the second component city of the Province of Pampanga. Mabalacat became a town in the year 1712. It was named after the Balacat tree (Zyzyphus Zonulata Blco.), which is a forth class timber. The word Mabalacat means "full of balacat". <a href="#"><img src="/MOWS/MOWS/images Slider/51520492.jpg" width="240" height="159" alt="Read More" /></a> </p> </div> <div class="slide"> <h1>Mayor Marino "Boking"<br> Morales</h1> <p>Donec gravida posuere arcu. Nulla facilisi. Phasellus imperdiet. Vestibulum at metus. Integer euismod. Nullam placerat rhoncus sapien. Ut euismod. Praesent libero. Morbi pellentesque libero sit amet ante. Maecenas tellus.</p> <a href="#"><img src="images Slider/boking.jpg" alt="learn more" width="227" height="130" /></a> </div> </div> </div> <table width="758" height="347" border="0"> <tr> <td width="41" height="343" bgcolor="#FFFFFF"> </td> <td width="351" bgcolor="#FFFFFF"><table width="355" height="159" border="0"> <tr> <td width="171" height="155" class="insidebgSmall"><table width="171" height="138" border="0"> <tr> <td width="165" height="22" class="Header_content">Job seach</td> </tr> <tr> <td height="86"><a href="../MOWS/Pagecheck/jobsearchcheck.php"><img src="images/jobsearch.png" width="165" height="86" alt="jobsearch_pic" /></a></td> </tr> </table></td> <td width="171" class="insidebgSmall"><table width="171" height="138" border="0"> <tr> <td width="165" height="22">HotSpots</td> </tr> <tr> <td height="86"><a href="hotspot(view).html"><img src="images/hotspot.png" width="165" height="86" /></a></td> </tr> </table></td> </tr> </table> <table width="350" height="144" border="0"> <tr> <td height="22" class="insidebgLarge">Announcements</td> </tr> <tr> <td class="Text_content"><div> <hr /> <?php $con = mysql_connect("localhost","root",""); mysql_select_db("mab_db", $con); $flag=1; $switch=1; $result=(mysql_query("select * from announcements_tbl ORDER BY Announcements_num DESC")); while($row=mysql_fetch_array($result)) { if($flag <= 5) { if ($switch == 1) { $switch = 2; ?> <div> <?php } else { $switch = 1; ?> <div> <?php } echo " $row[Announcements_name] <br> $row[Announcements_date] <br> $row[Announcements_from] <br> $row[Announcements_loc] <br> $row[Announcements_Desc] <br>"; ?> <hr /> </div> <?php $flag ++; } else { break; } } ?> </div> </td> </tr> </table></td> <td width="352" bgcolor="#FFFFFF"><table width="347" height="332" border="0"> <tr> <td height="226" class="insidebgLarge"><table width="339" height="329" border="0"> <tr> <td height="22">Events</td> </tr> <tr> <td height="157" class="Text_content"> <div> <hr /> <p> <?php $con = mysql_connect("localhost","root",""); mysql_select_db("mab_db", $con); $flag=1; $switch=1; $result=(mysql_query("select * from events_tbl ORDER BY Events_Num DESC")); while($row=mysql_fetch_array($result)) { if($flag <= 5) { if ($switch == 1) { $switch = 2; ?> </p> <div> <?php } else { $switch = 1; ?> <div> <?php } echo " $row[Events_Title] <br> $row[Events_Date] <br> $row[Events_loc] <br> $row[Events_desc] <br><br>"; ?> <hr /> </div> <?php $flag ++; } else { break; } } ?> </div></td> </tr> </table></td> </tr> </table></td> </tr> </table> <table width="759" border="0"> <tr> <td width="753" bgcolor="#FFFFFF"> </td> </tr> </table> <table width="761" height="143" border="0"> <tr> <td width="34" bgcolor="#FFFFFF"> </td> <td width="717" bgcolor="#FFFFFF"><table width="709" height="137" border="0"> <tr> <td width="348"><table width="356" height="138" border="0"> <tr> <td width="165" height="22" class="insidebg">HotLines</td> <td width="174" height="22" class="insidebg">Other Related links</td> </tr> <tr> <td height="86" class="insidebgSmall"><a href="Hotlines.html"><img src="images/hot lines.png" alt="" width="165" height="86" /></a></td> <td height="86"><img src="images/Otherlinks.png" width="165" height="86" /> <td width="10"> </tr> </table></td> <td width="351"><table width="345" height="132" border="0"> <tr> <td height="22" class="insidebg">Photos</td> <td class="insidebg">videos</td> </tr> <tr> <td> </td> <td> </td> </tr> </table></td> </tr> </table></td> </tr> </table> </div> </div> </div> </body> Quote Link to comment https://forums.phpfreaks.com/topic/249175-jquery-not-working-in-mozilla/ Share on other sites More sharing options...
PFMaBiSmAd Posted October 15, 2011 Share Posted October 15, 2011 You forgot to tell us what exactly it did wrong, because we don't have the ability to run your code with your data. Knowing exactly what part of the page worked and what the code did wrong or didn't do at all is crucial to locating what the problem is. Also, you need an exit; statement after your header() redirect to prevent the remainder of the code on your 'protected' page from running. Without an exit; statement, all a hacker needs to do is ignore the header() redirect that you are sending to the browser and he can freely access the remainder of the content on your 'protected' pages. Quote Link to comment https://forums.phpfreaks.com/topic/249175-jquery-not-working-in-mozilla/#findComment-1279590 Share on other sites More sharing options...
jushiro Posted October 15, 2011 Author Share Posted October 15, 2011 I think our script has a problem, here's the code.. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link rel="stylesheet" href="Slider/css/style.css" type="Slider/text/css" media="screen" charset="utf-8" /> <script type="text/javascript" src="Slider/js/jquery-1.2.6.js"></script> <script type="text/javascript" src="Slider/js/startstop-slider.js"></script> <link rel="stylesheet" type="superfish/text/css" href="superfish/css/superfish.css" media="screen"> <script type="superfish/text/javascript" src="superfish/js/jquery-1.2.6.min.js"></script> <script type="superfish/text/javascript" src="superfish/js/hoverIntent.js"></script> <script type="superfish/text/javascript" src="superfish/js/superfish.js"></script> <script type="superfish/text/javascript"> jQuery(function(){ jQuery('ul.sf-menu').superfish(); }); </script> There, so basically when i run it at Chrome, the designs is at their places. But when we tested it at chrome.. Their were exploded. xD Here i attach the screen shots .. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/249175-jquery-not-working-in-mozilla/#findComment-1279591 Share on other sites More sharing options...
jushiro Posted October 15, 2011 Author Share Posted October 15, 2011 Here's the screenshot for mozilla.. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/249175-jquery-not-working-in-mozilla/#findComment-1279592 Share on other sites More sharing options...
PFMaBiSmAd Posted October 15, 2011 Share Posted October 15, 2011 If your page layout is that broken, it is more likely due to the html. Have you cleared your browser cache/forced the page to reload so that the latest version of the page is being displayed? You are also loading two different versions of the jquery library. If you must use two different versions, you must use jQuery.noConflict() after loading the first version. You are also loading the same version in two different places. I would make sure that the page you are seeing in your browser is the current page and make sure that the resultant page is valid HTML using http://validator.w3.org/ Quote Link to comment https://forums.phpfreaks.com/topic/249175-jquery-not-working-in-mozilla/#findComment-1279606 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.