Autocomplete help

  • John_T
  • John_T's Avatar Topic Author
  • Visitor
  • Visitor
3 years 10 months ago #98485 by John_T
John_T created the topic: Autocomplete help
Hello all,

I'm having problems trying to set an autocomplete function for a question on the country of residence.

I use the code below to give the automated responses for Australia, Brazil and Canada. However this code creates an unwanted text field to which is applied the autocomplete - what I would like to do is remove this text field and apply the autocomplete function to the response field (see attached image).

As you can probably tell, I haven't a clue with html but would like to learn !

Many thanks in advance

John

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>autocomplete Demo</title>
<link rel="stylesheet" href=" code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css ">
<script src=" code.jquery.com/jquery-1.9.1.js "></script>
<script src=" code.jquery.com/ui/1.10.3/jquery-ui.js "></script>
</head>
<body>
<label for="autocomplete">
<input id="autocomplete">
<script>
$( "#autocomplete" ).autocomplete({
source: [ "Australia", "Brazil", "Canada"]
});
</script>
</body>
</html>


Attachment autocompleteex.png not found

Attachments:

Please Log in to join the conversation.

More
3 years 10 months ago #98490 by Ben_V
Ben_V replied the topic: Autocomplete help

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The following user(s) said Thank You: John_T

Please Log in to join the conversation.

  • John_T
  • John_T's Avatar Topic Author
  • Visitor
  • Visitor
3 years 10 months ago #98492 by John_T
John_T replied the topic: Autocomplete help
Merci beaucoup, ca marche !

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now