Is there an example how to create a web form that shows responses based on letters typed via AJAX?

I have searched for quite some time, but I can’t find an example of how to present options to the web client based on the letters that are entered as they are typed. Is this possible (probably) and is there an example that shows this?

Are you trying to use WASM for this? For such a trivial task, you should use JavaScript instead.

Do you mean like the suggestions that Google gives while you're typing on their search page?

I suppose you are talking about autocomplete feature, this usually works using JS + a backend service (if the data is dynamic and can't be cached on the user side on web page load).

The js part is straight forward, you can check JQuery example.
The backend part, you can use Serde+ actix or axum to build it. (an example)

1 Like

Based upon the mostly the help from @rusty0 I was able to create the following: Rust Playground

This provides the basic functionality that I asked about, which is provided mostly by javascript, and the web serving part by Axum. Thank you!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.