The scenario is I have an HTA that I use to communicate with a database through a telnet like client. It performs macro's and such for me. It's written in VBS to communicate with the client.
I'm attempting to add autocomplete functionality to it using Jquery. The problem however is I have an external file that hold's a list of items that I load into the HTA at startup and turn those into select options.
Based on the one option that is selected I return the value and text, and use that to carry out my macro. I thought about changing my file from just a normal textfile with the values being separated by hyphons into an XML file.
The problem is I'm not quite sure how to pass the selected option back to VBS based on the Jquery autocomplete code I'm seeing, and I've seen a lot at this point.
So is it possible to use Jquery to add a search field that picks a select option that is loaded from an external file and pass it back to VBS?
Ok, you're doing a lot of stuff that I know nothing about, but I'll take a shot at the Autocomplete part.
It sounds like you have a combobox - option values in an HTML select. Its just that the option items are dynamically loaded. If that is the case, I'd advise against using the jQuery Combobox widget that is in the documentation section. It is very complex. You may have better luck using the Combobox plug-in provided by Jonathan Tang. It is set up with options and you can put any function you want into the options. As a hypothetical, the open: option might contain your code to contact " an external file that hold's a list of items that I load into the HTA at startup and turn those into select options" Once you have select options, use a function in the source: option to "return the value and text, and use that to carry out my macro." Or something like that.
Leave a comment on mike_laird's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic