Pagina 2 di 2 primaprima 1 2
Visualizzazione dei risultati da 11 a 13 su 13

Discussione: Problema con radio

  1. #11
    Per il terzo radio niente...se l'utente vuole vedere tutto lo specifica! Dovrà pur fare qualcosa anche lui no???


    Fatto!!! location.php contiene questo:

    Codice PHP:
    <?php 
          $con
    =oci_connect('xxx','xxx','xxx.xxx');
          
    $lab_richiesto=$_GET['lab_richiesto'];
          
    $query=oci_parse($con,"select distinct interno from cons_elenco_esami_area_lab where laboratorio='$lab_richiesto'");
    oci_execute($query);
    while((
    $riga=oci_fetch_array($queryOCI_NUM OCI_RETURN_NULLS))){
           
    $interno=$riga[0];
    }
    echo 
    $interno;
    oci_close($con);
    ?>
    OK???
    Adesso???

  2. #12
    Brava, sette più!

    inserisci questo script nel tag head della pagina col modulo
    codice:
    <script language="javascript" type="text/javascript">
    function assegnaXMLHttpRequest() {
    	var 
    		XHR = null,
    		browserUtente = navigator.userAgent.toUpperCase();
    	if(typeof(XMLHttpRequest) === "function" || typeof(XMLHttpRequest) === "object")
    		XHR = new XMLHttpRequest();
    	else if(window.ActiveXObject && browserUtente.indexOf("MSIE 4") < 0) {
    		if(browserUtente.indexOf("MSIE 5") < 0)
    			XHR = new ActiveXObject("Msxml2.XMLHTTP");
    		else
    			XHR = new ActiveXObject("Microsoft.XMLHTTP");
    	}
    	return XHR;
    }
    
    function getVal(param){
    	var rnd = Math.random();
    	var strURL=param+'&amp;nocache='+rnd;
    	var req = assegnaXMLHttpRequest();
    	req.open("GET", strURL, false);
    	req.send(null);
    	return req.responseText;
    }
    function checkradio(labid){
    	var location=getVal('location.php?lab_richiesto='+labid);
    	if(location=='S'){
    		document.getElementById('yes').checked=true;
    	}else{
    		document.getElementById('no').checked=true;
    	}
    }
    </script>
    L'HTML dovrebbe già star bene assicurati che ci siano
    onchange='checkradio(this.value)' Nella Select
    e id='yes' nella prima radio, id='no' nella seconda.

    Il file location.php deve stare nella stessa cartella del modulo.

    Fammi sapere se funziona.

  3. #13
    ODDIO....sei veramente un genio!!!
    Ho cambiato il laboratorio, ne ho scelto uno esterno e il cambio del radio avviene correttamente!!!
    Però se poi scelgo un laboratorio interno non mi fa più il cambio del radio e rimane cmq checkato su esterno (devo cambiarlo manualmente)!!
    Perchè???
    E poi è lentissimo... (potrei anche fregarmene ma già che ci sono ti dico tutto, magari per risolvere la cosa è una cavolata)

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.