javascript在div上加载php并不适用于Firefox

时间:2015-05-26 07:11:27

标签: javascript php jquery html

我有几个php页面用javascript脚本动态创建链接,这些脚本在同一个div中加载不同的内容。创建链接的功能如下:

$variablephp = $_GET['id'];
$result = mysql_query( "SELECT `BASIC` FROM `roleflow_training` WHERE `ROLE_ID`=".$variablephp.""); //Once the text has been saved in the BBDD: 
$result = mysql_result ($result, 0, "BASIC");
$result = preg_replace("/\n+/", "\n",$result); 
$lineas = explode("\n", $result); 
echo "<ul>\n"; 

foreach ($lineas as $bullet) 
{ 
    $test = preg_replace("/\n+/", "", $bullet);
    $prueba = chop($test, "\n");
    $prueba = chop($prueba, "\b");
    $prueba = chop($prueba, "\br");
    $prueba = "'".$prueba."'";
    $link = mysql_query("SELECT * FROM `cursos_training` WHERE `COURSE_NAME`=".$prueba."");
    $existe = mysql_num_rows($link);
    if ($existe < 1)
    {
        echo "<li>".$test."</li>\n"; 
    }
    else
    {
        $fila = mysql_fetch_array($link);
        $enlace = $fila['IDLINK'];
        $direccion = "<a href=\"javascript:$('#floatFlowCursos').css('display','none');$('#contentFlow').load('curso1_info.php?id=".$enlace."')\">";
        echo "<li>".$direccion.$bullet."</a>"."</li>\n"; 
    }
} 
echo "</ul>";

这句话与Chrome完美配合,但不适用于Firefox或I Explorer,您有什么想法吗?

非常感谢您的支持!干杯!!

0 个答案:

没有答案