rgb192
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
another example:
$chosen =yes
or
$chose = no
if $chosen =yes
yes
yes
no
if $chosen=no
yes
no
no
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>';
another example:
$chosen =yes
or
$chose = no
if $chosen =yes
yes
yes
no
if $chosen=no
yes
no
no
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Can you post a php page with the code ?
ASKER
the code I provided had more of a php problem
I have a simplified example
https://www.experts-exchange.com/questions/27857043/jquery-editInPlace-select-options-shows-repeats-if-I-put-the-default-value-first.html
I have a simplified example
https://www.experts-exchange.com/questions/27857043/jquery-editInPlace-select-options-shows-repeats-if-I-put-the-default-value-first.html