Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    problema ajax con firefox

    Salve ho un problema che non riesco a risolvere io ho fatto questo sript js:
    Codice PHP:
    function getXMLObject_ut() {
    var 
    xmlHttp_ut false;
    try { 
    xmlHttp_ut = new ActiveXObject("Msxml2.XMLHTTP"
    }
    catch (
    e) {
    try { 
    xmlHttp_ut = new ActiveXObject("Microsoft.XMLHTTP"
    }
    catch (
    e2) {
    xmlHttp_ut false
    }
    }
    if (!
    xmlHttp_ut && typeof XMLHttpRequest != 'undefined')

    xmlHttp_ut = new XMLHttpRequest(); 

    return 
    xmlHttp_ut;

    var 
    xmlhttp_ut = new getXMLObject_ut();
    function 
    prova(nome) {
    var 
    getdate_ut = new Date(); 
    if(
    xmlhttp_ut) {
    document.getElementById('video_player').innerHTML ="loading"
    var 
    nome nome
    var 
    parameters="nome="+nome 
    xmlhttp_ut
    .open("POST","php/video.php",true); 
    xmlhttp_ut.onreadystatechange handleServerResponse_ut;
    xmlhttp_ut.setRequestHeader('Content-Type''application/x-www-form-urlencoded');
    xmlhttp_ut.send(parameters);


    function 
    handleServerResponse_ut(){ 
    if (
    xmlhttp_ut.readyState == 4) {
    document.getElementById('video_player').innerHTML xmlhttp_ut.responseText;
    }

    e questo e il file video.php
    Codice PHP:
    <?php
    $nome
    =$_POST['nome'];
    echo
    "<object id=\"player\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" name=\"player\" width=\"400\" height=\"315\">";
    echo
    "<param name=\"movie\" value=\"player-viral.swf\" />";
    echo
    "<param name=\"allowfullscreen\" value=\"true\" />";
    echo
    "<param name=\"flashvars\" value=\"file=$nome&image=preview.jpg\" />";
    echo
    "<embed";
    echo
    "type=\"application/x-shockwave-flash\"";
    echo
    "id=\"player2\"";
    echo
    "name=\"player2\"";
    echo
    "src=\"player-viral.swf\" ";
    echo
    "width=\"400\" ";
    echo
    "height=\"315\"";
    echo
    "allowfullscreen=\"true\"";
    echo
    "flashvars=\"file=$nome&image=preview.jpg\" ";
    echo
    "/>";
    echo
    "</object>";
    ?>
    Il problema e che va con tutti i browser tranne firefox ovvero nel div video_player conpare solo la scritta loading ma non compare il lettore..Sapete aiutarmi?Grazie in anticipo dell aiuto.

  2. #2
    scaricati firebug per firefox ed analizza quello che lo script inserisce nella pagina dopo la richiesta AJAX.
    I DON'T Double Click!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.