KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have one select box with options and I am using jQuery "Chosen" on a Zend View. This plugin is working fine. Javascript: $('#select_type').chosen(); My problem is I need to select one of the options when the page loads depending on what the value of type_id is. I tried this: document.getElementById('select_type').value = '<?=$this->type_id?>'; This changes its value but the option is not selected in the JQuery chosen. Any ideas? EDIT: The option successfully changes by doing what I have mentioned above but it does not update/change the selected element in jQuery "chosen" plugin. My question is about updating the selected value for jQuery Chosen not the HTML SELECT (which I have done successfully). Here is a link to jQuery Chosen plugin
Tags (comma-separated)
Save Edits
Cancel