From: Daniel Carl Date: Thu, 23 Apr 2015 07:14:50 +0000 (+0200) Subject: Allow to use formfiller also for new html5 input types. X-Git-Url: https://git.owens.tech/rss.xml/rss.xml/git?a=commitdiff_plain;h=ff6834a2793502a7042be0e48849d1a917c3c5d0;p=vimb.git Allow to use formfiller also for new html5 input types. --- diff --git a/examples/formfiller/scripts.js b/examples/formfiller/scripts.js index f9bbd8f..8357409 100644 --- a/examples/formfiller/scripts.js +++ b/examples/formfiller/scripts.js @@ -30,12 +30,12 @@ var _vbform = { if (n == "input") { t = e.type; - if (!t || t == "text" || t == "password") { - e.value = v; - } else if (t == "checkbox" || t == "radio") { - e.checked = ("1" == v) ? true : false; + if (t == "checkbox" || t == "radio") { + e.checked = ("1" == v); } else if (t == "submit") { e.click(); + } else { + e.value = v; } } else if (n == "textarea") { e.value = v;