want a jquery option select editInPlace example code

Posted on 2012-09-07
Last Modified: 2012-09-08
want to find a code example of
edit inplace.js dropdown menu

that uses a form

the only example I can find and use is

I am looking for another example demo

not looking for jquery.editInPlace source code
Question by:rgb192
    LVL 82

    Accepted Solution

    Read the comments in the code.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    <html xmlns="">
    		<script type="text/javascript" src=""></script>
    		<script type="text/javascript" src=""></script>
    		<script type="text/javascript">
    				//for the options you need a comma separated list of options.  Each option needs to be formatted as:
    				//Format A:						
    				//		option_text1:option_value1, option_text2:option_value2, option_text3:option_value3,...
    				//and is used to generate/construct 
    				//	<option value="option_value1">option_text1</option>
    				//	<option value="option_value2">option_text2</option>
    				//	<option value="option_value3">option_text3</option>
    				//	...
    				//Format B:
    				//		optionTextAndValue1, optionTextAndValue2, optionTextAndValue3,...
    				//internally this is "converted" to Format A "optionTextAndValue1:optionTextAndValue1, optionTextAndValue2:optionTextAndValue2, optionTextAndValue3:optionTextAndValue3, ..."
    				//and is used to generate/construct
    				//	<option value="optionTextAndValue1">optionTextAndValue1</option>
    				//	<option value="optionTextAndValue2">optionTextAndValue2</option>
    				//	<option value="optionTextAndValue3">optionTextAndValue3</option>
    				//	...
    				//here's an example that uses Format A.  Ultimately you will see just he abbreviation of the state
    				var stateOpt={	'field_type': 'select'
    							,'select_text':'Choose a State from the list below'
    							,'select_options': 'California:CA, Ohio:OH'
    							,'callback': function(element_id, selectedValue, originalText) { 
    								return selectedValue;
    				//here's an example that uses Format B
    				var provinceOpt={	'field_type': 'select'
    							,'select_text':'Choose a Province from the list below'
    							,'select_options': 'Alberta, Quebec'
    							,'callback': function(element_id, selectedValue, originalText) { 
    								return selectedValue;
    				//notice that regardless of which Format you choose, the second argument to the callback
    				//function is always the VALUE of the selected <option>
    		<div>State: <span id="state" class="editMe">???</span></div>
    		<div>Province: <span id="province" class="editMe">???</span></div>

    Open in new window


    Author Closing Comment

    thank you

    now I know 2 types of select options

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: HTML5 Specialist

    HTML5 development skills are critical to all developers. HTML5 is the foundation to almost any development process. That's why business, design studios, development shops and other organizations need HTML5 developers. Get your foot in the door as a HTML5 specialist.

    Suggested Solutions

    Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
    Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
    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…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now