|
 |
|
run javascript บน GoogleChorm กับ Firefox ไม่ได้อ่ะครับ ทำไงดี ? |
|
 |
|
|
 |
 |
|
แล้วไหนโค้ดตัวที่บอกว่าไม่ได้อะครับ  
|
 |
 |
 |
 |
Date :
2009-10-20 10:07:58 |
By :
NanoThoro |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
<html>
<body>
<script language="JavaScript">
<!--
//
var version = "other"
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3) version = "n3";
else if (browserName == "Netscape" && browserVer < 3) version = "n2";
else if (browserName == "Microsoft Internet Explorer" && browserVer >= 4) version = "e4";
else if (browserName == "Microsoft Internet Explorer" && browserVer < 4) version = "e3";
function stopError()
{
return true;
}
window.onerror = stopError;
function wireOpen()
{
if (version == "e4")
{
document.write("<marquee behavior=scroll direction=up width='100%' height=75 scrollamount=1 scrolldelay=70 onmouseover='this.stop()' onmouseout='this.start()'>")
}
}
function wireClose()
{
if (version == "e4")
{
document.write("</marquee>")
}
}
function MM_popupMsg(theMsg) { //v2.0
alert(theMsg);
}
function Start(page){
OpenWin = this.open(page, "CtrlWindow","toolbar=No,menubar=No,location=No,scrollbars=No,resizable=Yes,status=No,width=420,height=280,top=150,");
}
//-->
</Script>
<script language="JavaScript">
wireOpen();
</script>
<p></p>
<?
/* include "inc/phpFunctionDB.php";
Conn2DB(); */
$SQL="SELECT * FROM news WHERE status='Y' ";
$Query=mysql_query($SQL);
?>
<table width="200" border="0" cellspacing="0" align="left" cellpadding="0" height="46">
<?
while($Array=mysql_fetch_array($Query)){
?>
<tr>
<td align="center" height="35">
<div align="left"><font face="System, MS Sans Serif, AngsanaUPC"><a href="javascript:void(0);" onclick="javascript:Start ('t_news_detial.php?id=<?=$Array['news_id']?>');"><?=$Array['news_topic']?></a></font></div></td>
</tr>
<p><p><p>
<?
}
?>
</table>
<script language="JavaScript">
wireClose();
</script>
</body>
</html>
|
 |
 |
 |
 |
Date :
2009-10-20 11:21:17 |
By :
onizike |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อันนี้ผมก็ Copy มาจากคนอื่นเอามาดัดแปลงอีกทีอ่ะครับ คุณนาโน
ช่วยดูหน่อยนะคร๊าบ ขอบคุณมากมายครับ 
|
 |
 |
 |
 |
Date :
2009-10-20 11:22:54 |
By :
onizike |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
  
ดูแล้วครับ จะให้ผมทำอะไรต่อครับ
   
|
 |
 |
 |
 |
Date :
2009-10-20 11:40:43 |
By :
NanoThoro |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
จากที่ผมนั่งดูโค้ดแล้ว มันกำหนดให้รันได้เฉพาะไออีนี่ครับ แล้วส่วนไหนครับที่คุณต้องการให้มันทำงานได้ทุกบราวเซอร์อะครับ
งง
|
 |
 |
 |
 |
Date :
2009-10-20 12:02:42 |
By :
NanoThoro |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณครับ คุณนาโน copy เพลินจนลืมดู อิอิ 
งั้นผมขอถามหน่อยครับว่าต้องแทรก script อะไรเพิ่มอีกครับ เพื่อให้รัน Firefox กับ Chorm ได้ (ถามแบบโง่ ๆ เลยครับ เพราะผมโง่จริง) 
|
 |
 |
 |
 |
Date :
2009-10-20 14:45:53 |
By :
onizike |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เรื่องของการเรียนรู้ ไม่มีใครโง่ ไม่มีใครฉลาดกันหรอกครับ อยู่ที่รู้ หรือไม่รู้ เข้าใจ หรือไม่เข้าใจต่างหากครับ เพราะคนเรามันมีพื้นฐานที่แตกต่างกันครับ บางเรื่องผมเองยังทำไม่ได้ก็ต้องมาโพสถามเหมือนกันนั่นแหละครับ
  
|
 |
 |
 |
 |
Date :
2009-10-20 14:59:43 |
By :
NanoThoro |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
สคริปเลื่อนข้อความ ธรรมดา ใช่มั้ยครับ
เอา if (version == "e4") ออกก้ใช้ได้ทุกเบราเซอร์แล้วล่ะครับ
|
 |
 |
 |
 |
Date :
2009-10-20 15:21:28 |
By :
lozomac |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ใช่เลยครับ แก้ได้แล้วครับ ขอบคุณ A-mac มากมากเลยครับ 
|
 |
 |
 |
 |
Date :
2009-10-20 15:45:11 |
By :
onizike |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
บวกคะแนนให้ คุณนาโน กับ คุณ A-mac เลยครับ ขอบคุณที่ช่วยครับ 
|
 |
 |
 |
 |
Date :
2009-10-20 15:47:39 |
By :
onizike |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 03
|