Hi,

I use an text input box and a green tick image.
The green tick is made visible when you choose something on the
autocompleter.
Then it's made invisible when you modify the text input box.
To do this I use the callback() option of Autocompleter.
But it doesn't work when I delete the entire input box, after I have
selected one item from autocompleter list box.

My code follows:

<input type="text" id="autocomplete" name="autocomplete_parameter"
size=20/>

<span id="TickGreen" style="visibility: hidden"><img src="/mapAccel/
images/TickGreen.gif"></span>

<div id="autocomplete_choices" class="autocomplete"></div>

<script type="text/javascript">
new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "/base/
Grafo_autocomplete.jsp", {
        method: 'get',
        paramName: 'name',
        afterUpdateElement : getSelectionId,
        callback : resetId
        });

function resetId(txt, q) {
        $("TickGreen").style.visibility = "hidden";
        return q;
}

function getSelectionId(text, li) {
        $("TickGreen").style.visibility = "visible";
}
</script>


What's wrong?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to