Is it possible to use the library with an input text box? I have tried but it doesn't work! For example:
<input type="text" id="textId"/>
(....)
var auto = completely(document.getElementById('textId')........
Regards.
Is it possible to use the library with an input text box? I have tried but it doesn't work! For example:
<input type="text" id="textId"/>
(....)
var auto = completely(document.getElementById('textId')........
Regards.
you have to change your code to be like this:
HTML
<div id="textId"></div>
JAVASCRIPT CODE
var auto = completely(document.getElementById('textId'));
...then it will work
auto.onChange = function setFiller(){
auto.repaint();
if(document.getElementById("Requestor")){
document.getElementById("Requestor").value=auto.getText();
}
}
You could add this (in the tags at the end of the section you added into the body of your page). It still allows for the default use of the repaint function that is defaulted for the onChange function and then fills the input element (probably type=hidden within the page's form) with the current text.. ('auto' is the completely var) ("Requestor" is the id of the input element.)