Visualizzazione dei risultati da 1 a 6 su 6

Discussione: radio button

  1. #1

    radio button

    Ciao.

    Sto realizzando un modulo in flash che mi permetta di inviare cartoline allegate all'email.
    Ora, x scegliere quale cartolina inviare ho usato il radio button (uso MX), ma non riesco a capire come associargli il valore e recuperarlo per passarlo poi alla pagina php.
    non si finisce mai di sperare...

  2. #2
    dalla guida

    codice:
    In the following example, onChange is a handler function specified for two CheckBox components. The handler function accepts an instance of a changed component as a parameter, uses a series of if/else if statements to determine which check box instance is selected and enables either listBox1 or listBox2 depending on the value of the check box instance. 
    
    function onChange(component)
    {
    
    if (component._name=="check1") {
    	listBox1_mc.setEnabled(component.getValue());
    } else if (component._name=="check2") {
    	listBox2_mc.setEnabled(component.getValue());
    } 
    }
    Another way of accomplishing the same thing is to specify a different changeHandler function for each CheckBox component, as shown in the following example: 
    
    For the check1 instance, specify onCheck1 as the Change Handler parameter on the Parameters tab in the Property inspector. You must define the onCheck1 function in the same Timeline as the check1 component instance. If the user selects the check1 instance of the check box, the list box instance listBox1 is enabled. 
    
    function onCheck1(component)
    {
    
    	listBox1_mc.setEnabled(component.getValue());
    }
    For the check box instance check2, specify onCheck2 for the Change Handler parameter on the Parameters tab in the Property inspector, and define the onCheck2 function in the same Timeline as the check2 component. If the user selects the check2 instance of the check box, the list box instance listBox2 is enabled. 
    
    function onCheck2(component)
    {
    
    	listBox2_mc.setEnabled(component.getValue());
    }

  3. #3
    ok grazie...
    questa funzione recupera il valore del radiobutton selezionato... adesso però dovrei inserire questo valore all'interno del code del form e dire:

    var x = valore della funzione onChange

    giusto?
    non si finisce mai di sperare...

  4. #4
    codice:
    Box1.setValue(true);
    Box = new Object();
    Box.cambia = function(component) {
    	trace(box1.getValue());
    };
    //chiamo la funzione al cambio
    box1.setChangeHandler("cambia", Box);

  5. #5
    non si finisce mai di sperare...

  6. #6

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.