Modify item order in select field with javascript -


i have this:

    <select name="repeat_period">     <option value="24">daily</option>     <option value="168">weekly</option>     </select> 

and goal remove/hide daily item force chose weekly. solution invert item order , set "readonly". in both case don't know how do.

precision: don't have access html of page. can use javascript try make modification , don't know javascript.

any clue ?

fortunately found solution in forum people more disposed newbie me. if guru coder, not need ask help.

    <script type="text/javascript">     function removeit(){     var sel=document.getelementsbyname('repeat_period')[0];     sel.options.remove(0);     }     removeit();     </script> 

http://jsfiddle.net/ygpw4/


Comments

Popular posts from this blog

codeigniter - Fatal error: Call to undefined function lang() in CI Merchant using CardSave -

javascript - CasperJS/PhantomJS failing SSL handshakes on some sites even with --ssl-protocol=any -

python - Received unregistered task using Celery with Django -