pasqualeberesti, to javascript French
@pasqualeberesti@piaille.fr avatar

des experts dans la place ?

J'utilise pour récupérer des données dans une base de données. Ça fonctionne super bien, mais...
je voudrais que sur un input, la liste déroulante de l'autocomplete s'affiche automatiquement, et je ne trouve pas malgré mes recherches.

J'ai trouvé cette solution :

$( function() {
$("").autocomplete({
source: autocompleteValues,
minLength: 0
}).focus(function(){
$(this).autocomplete("search", "");
});
});

mais ça ne fonctionne pas, sur Brave au tout cas. quand je fais le focus sur my_input, la liste de valeurs ne s'affiche pas et je dois taper une touche.
Une idée ?

aral, to webdev
@aral@mastodon.ar.al avatar

Little web dev tip: if you have just one address field in your HTML form (e.g., a textarea) but you still want the person filling it in to avail themselves of autocomplete, here’s a little reusable snippet you can use to achieve that:

https://codeberg.org/aral/gists/src/branch/main/single-html-address-field-with-autocomplete-using-javascript.md

(Ideally the web spec should be extended to include a full-address value for the autocomplete attribute.)

joe, (edited ) to webdev

Have you ever stumbled upon those form fields that suggest options in a drop-down as you type, like when you’re entering a street address? It turns out, that making those are not as difficult as you would think! Today, I’m gonna walk you through three cool ways to pull it off using Vue.js. Let’s dive in!

Vuetify

If you are a Vue developer, you have likely used Vuetify at some point. It is an open-source UI library that offers Vue Components for all sorts of things. One of those things just happens to be Autocompletes.

See the Pen by Joe Steinbring (@steinbring)
on CodePen.

Last week, I spoke about creating a repository of data for coding examples. The first one is a list of counties in the state of Wisconsin. In this example, the values from the API are stored in a counties array, the value that you entered into the input is stored in a selectedCounty variable, and the fetchCounties method fetches the values from the API. Thanks to the v-autocomplete component, it is super easy using Vuetify.

Shoelace

Shoelace (now known as Web Awesome) doesn’t have a built-in autocomplete element but there is a stretch goal on their kickstarter to add one. That means that we need to build the functionality ourselves.

See the Pen by Joe Steinbring (@steinbring)
on CodePen.

Our Shoelace version has a filteredCounties variable so that we can control what is shown in the suggestions and a selectCounty method to let the user click on one of the suggestions.

Plain HTML and CSS

We have already established that Shoelace doesn’t have an autocomplete but neither does Bulma or Bootstrap. So, I figured that we would try a pure HTML and CSS autocomplete.

See the Pen by Joe Steinbring (@steinbring)
on CodePen.

This is very similar to our Shoelace example but with some extra CSS on the input. You might be wondering about that autocomplete attribute on the input. It is a different type of autocomplete. The autocomplete attribute specifies if browsers should try to predict the value of an input field or not. You still need to roll your own for the suggestions.

https://jws.news/2024/how-to-impliment-an-autocomplete-using-vue/

#Autocomplete #HTML #JavaScript #VueJs #Vuetify #WebAwesome

gklein88, to accessibility

Hi, @semaphore Your #autocomplete is extremely overzealous. My focus shouldn't move to the autocomplete listbox just by left-arrowing over someone's username or navigating by word just to proofread a toot. #blind #ScreenReader #a11y

peterbutler, to IThinkYouShouldLeave
@peterbutler@mas.to avatar

My Google-personalized auto-complete for any search starting with “help” is “help a shirt brother” 😭

#ITYSL #IThinkYouShouldLeave #BiffWiff #HelpAShirtBrother #AutoComplete

itnewsbot, to business
@itnewsbot@schleuss.online avatar

X Challenger Pebble Thinks AI-Generated Posts Can Help Lure Users Away From Elon Musk - To encourage conversation, Twitter-like platform Pebble—formerly T2—now suggests AI-gener... - https://www.wired.com/story/x-challenger-pebble-thinks-ai-generated-posts-can-lure-users-elon-musk/ #business/socialmedia #autocomplete #business

remixtures, (edited ) to ai Portuguese
@remixtures@tldr.nettime.org avatar

#AI #Google #Spellcheckers #Autocomplete #Writing: "Soon after ChatGPT was released, an artificial intelligence researcher from one of the big tech companies told me that I shouldn’t worry about how the technology would affect how students learn to write. In two years, she assured me, only aspiring professional writers would enroll in writing classes; no one else would need to write anymore.

I remembered that conversation recently when I got advance access to Google Docs’ new “Help me write” feature, which is expected to be rolled out to all users soon. Once you have this feature, it becomes the default in Google’s word processor: The magic wand appears every time you open a document, ready to generate and revise text for you. If you want to write yourself, you have to close the feature." https://www.latimes.com/opinion/story/2023-06-20/google-microsoft-chatgpt-ai-writing-assistants-artificial-intelligence

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • khanakhh
  • mdbf
  • InstantRegret
  • Durango
  • Youngstown
  • rosin
  • slotface
  • thenastyranch
  • osvaldo12
  • ngwrru68w68
  • kavyap
  • cisconetworking
  • DreamBathrooms
  • megavids
  • magazineikmin
  • cubers
  • vwfavf
  • modclub
  • everett
  • ethstaker
  • Leos
  • tacticalgear
  • normalnudes
  • tester
  • GTA5RPClips
  • anitta
  • JUstTest
  • All magazines