{"id":1181,"date":"2013-07-16T19:25:08","date_gmt":"2013-07-16T19:25:08","guid":{"rendered":"http:\/\/www.phpmind.com\/blog\/?p=1181"},"modified":"2013-07-16T19:28:42","modified_gmt":"2013-07-16T19:28:42","slug":"how-to-pass-dropdown-name-to-text-box","status":"publish","type":"post","link":"https:\/\/www.phpmind.com\/blog\/2013\/07\/how-to-pass-dropdown-name-to-text-box\/","title":{"rendered":"How to pass dropdown name to text box ?"},"content":{"rendered":"<p>Select a dropdown name and pass value to another text field is very easy using jquery. <\/p>\n<pre lang=\"html\">\r\n<input id=\"operational_name1\"  type=\"text\" value=\"\" name=\"operational_name\">\r\n\r\n<select id=\"account_name1\" name=\"account_name3\">\r\n    <option value=\"1\">PANAAIR<\/option>\r\n    <option value=\"2\">PANASONIC AVIONICS CORP.<\/option>\r\n    <option value=\"3\">ZOOM AIRLINES<\/option>\r\n<\/select>\r\n\r\n\r\n\r\n<script type=\"text\/javascript\">\r\n    $(document).ready(function(){\r\n        $(\"#account_name1\").live(\"change\", function() {\r\n           $('#operational_name1').val($(this).find(\":selected\").text());\r\n        });\r\n    });\r\n<\/script>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Select a dropdown name and pass value to another text field is very easy using jquery. PANAAIR PANASONIC AVIONICS CORP. ZOOM AIRLINES<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[27,30],"tags":[],"class_list":["post-1181","post","type-post","status-publish","format-standard","hentry","category-javascript","category-jquery"],"_links":{"self":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/comments?post=1181"}],"version-history":[{"count":3,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1181\/revisions"}],"predecessor-version":[{"id":1183,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1181\/revisions\/1183"}],"wp:attachment":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/media?parent=1181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/categories?post=1181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/tags?post=1181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}