Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

do not want repeats in select menu

jquery editinplace
field_type: select

$boxtype from php or php/mysql
is the default value
but it is repeated in select

$boxtype=coldwater
        echo '<h3>Box Type: <span id="boxtype">'.$boxtype.'</span></h3>';
        echo '<script type="text/javascript">
                    $(document).ready(function(){
                        $("#boxtype").editInPlace({
                            url: "products.php",
                            params: "a=changeboxtype&pid=' . $p['productid'] .'",
                            saving_text: "Saving ...",
                            field_type: "select",
                            select_options: "none:not set ,coldwater:coldwater, 2210:2210, 60:60, 38:38, 30:30"
                        });
                    });
                </script>';

Open in new window






another example:

$chosen =yes
or
$chose =  no



if $chosen =yes
yes
yes
no

if $chosen=no
yes
no
no
ASKER CERTIFIED SOLUTION
Avatar of fourck
fourck

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can you post a php page with the code ?
Avatar of rgb192

ASKER