?
Solved

do not want repeats in select menu

Posted on 2012-09-06
4
Medium Priority
?
349 Views
Last Modified: 2012-09-07
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
0
Comment
Question by:rgb192
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
fourck earned 2000 total points
ID: 38375234
Hi,

This seems to be a php loop related problem and not jquery.

you should try to take a deeper look to your php code to see what's missing.

Good Luck!
0
 
LVL 27

Expert Comment

by:Lukasz Chmielewski
ID: 38376482
Can you post a php page with the code ?
0
 
LVL 1

Author Closing Comment

by:rgb192
ID: 38376545
the code I provided had more of a php problem

I have a simplified example

http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_27857043.html
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question