Creating AJAX-style auto complete functionality within Axure prototypes – UPDATED
This post has already been read 904 times!
I am currently building a prototype for a client which early on requires a demo to users of the system, and I really wanted to put the time into building a prototype that was as realistic as possible. With that in mind, I wanted to build an Ajax-style auto complete field that demonstrated the functionality and potential use of the field in the system.
The idea was to just build a simple text field for ‘first names’ with a dynamic panel that would refine the options based on the input – standard auto complete functionality.
So drop on a text field and a label, name them to distinguish what field is what, then put a dynamic panel underneath the text field, as shown in the screen shot.
Building the groundwork
Now the action we want to capture is the entering of data into the text field, and for this purpose, Axure provides the ‘OnKey’ action. Typically auto complete fields are shown after a few characters are entered, so I setup mine to display after two characters, then display a drop down of 5 results.
So in your dynamic panel, line up a table displaying 5 results that will sit just below the text field. As a useful extra, I bold the first two letters to give more context to what’s happening.
Handy Note!
To help line it up underneath your text field, go back to the ‘page’ view when only have one state for your panel, and you will see the list in context and allow you to place it.
Now we need to add some more panels for each extra character typed. For my example I have five in total, each with a slightly refined ‘results’ list.
For every panel state, the list gets refined a little further, an extra letter gets bolded, and there should be an extra panel or two for ‘selecting’ an option.
Creating the logic & displaying the panel states
Once all the panel states are complete, the interactions are created on the page, using the ‘OnKeyUp’ event on the ‘First Name’ text field.
Add an ‘OnKeyUp’ interaction with two conditions:
Length of widget value - set this to ’2′.
Text on widget – set this to the fist two characters of your results set.
and set the action for this to be the panel state created first, which shows the 5 results.
The panel for selecting an option should both highlight the option being selected and put the selected word in the text field.
The above screen shows the selected option highlighted, and the ‘OnClick’ action for the selected option uses the ‘Set text on widget’ action to set the text field to the selected option.
This needs to be repeated for the other panels, but changing the length and value conditions.
The overall interactions window should look something like the following.
The finished product!
The final rendered version should look like the following and work flawlessly!
This process can be repeated for other results sets / inputs to give more than one scenario, but generally no than two scenarios are required for a prototype.
If anyone wishes to get a copy of the .rp project or the .rplib for the master, I can put this up as well.
UPDATE #1 – Due to popular demand (over 500+ downloads) have updated this to fix issues with Axure 6.x importing. Apologies for the delay in resolving this issue!
http://www.hamishking.com/wp-content/files/AJAX-autocomplete_example_v6.rplib
Happy prototyping!
11 Responses to Creating AJAX-style auto complete functionality within Axure prototypes – UPDATED
Leave a Reply Cancel reply
Most Read Posts
- Building Ideas in Rails – thoughts from a ‘non-developer’
- Updated blog and Axure content
- Document management –the necessary evil
- The ‘Business Analyst’ – ambiguous title for an IT chameleon or generic title for SMEs through to support analysts?
- Ariba on Demand Single-Sign On - A more detailed explanation and walkthrough
Recent Posts
- Ariba on Demand Single-Sign On – A more detailed explanation and walkthrough
- Building Ideas in Rails – thoughts from a ‘non-developer’
- The ‘Business Analyst’ – ambiguous title for an IT chameleon or generic title for SMEs through to support analysts?
- Document management –the necessary evil
- Updated blog and Axure content
Recent Comments
- Lori Witzel on Using Visio Shape Reports to export detail from your diagrams
- Business Analyst Tip: Exporting Shape Info from MS Visio | seilevel.com on Using Visio Shape Reports to export detail from your diagrams
- Button-less search fields on mobile on Creating AJAX-style auto complete functionality within Axure prototypes – UPDATED
- Building Ideas in Rails – thoughts from a ‘non-developer’ | Business Analysed on The ‘Business Analyst’ – ambiguous title for an IT chameleon or generic title for SMEs through to support analysts?
- Auto-Suggest on Creating AJAX-style auto complete functionality within Axure prototypes – UPDATED
Twitter Feed
- Trying to disconnect from @VodafoneAU after moving overseas and have been to asked to call back again 5 times! #awfulcustomersupport 1 month ago
- RT @pitchforkmedia: LCD Soundsystem Documentary to Screen in U.S. This Summer, Thanks to Beastie Boy Adam Yauch http://t.co/sP2sU1H5 1 month ago
- RT @coachella: With #HeinekenColdStorage at #Coachella2012, your beer stays ice cold until you claim it, by scanning your thumbprint #th ... 1 month ago
- Building ideas in #rails: thoughts from a 'non-developer' around building ideas rather than writing them down http://t.co/yzeB02hX 2 months ago
- RT @Salmon_11: @Tim_Cahill Old Hill Wanderers @oldhillafc. #timcahillgiveaway 2 months ago
Archives
- March 2012 (2)
- February 2012 (1)
- January 2012 (1)
- December 2011 (1)
- August 2010 (1)
- July 2010 (11)
- June 2010 (1)
- May 2010 (3)
- April 2010 (1)
- February 2010 (2)
- January 2010 (7)
- December 2009 (2)
Categories
- Ariba on Demand (1)
- Axure RP (11)
- Business Analysis (7)
- Prototyping (2)
- Quick Tips (4)
- SharePoint 2010 (10)
- Uncategorized (1)
- Visio 2010 (8)







Very cool. I just created something very similar in a prototype, but only going to 2 letters in because it seemed a bit daunting to go further. Nice!
Glad to hear you liked it! I was going to go further in with more states and conditions to refine the options and go for another entry, but that might have to wait for a while!
[...] This post was mentioned on Twitter by axure rp and Brian Phelps, hamish king. hamish king said: New #axure post, Creating AJAX-style auto complete functionality within Axure prototypes – build realistic prototypes! http://bit.ly/7Ay4jR [...]
[...] a post the other day I detailed how to replicate the always popular AJAX-style autocomplete functionality within Axure. In a similar vain, I wanted to replicate another popular AJAX-enabled function, the [...]
[...] a post the other day I detailed how to replicate the always popular AJAX-style autocomplete functionality within Axure. In a similar vain, I wanted to replicate another popular AJAX-enabled function, the [...]
Hi,
Can you post the rp file or the rplib for this? I found myself lost after doing the dropdowns
Great stuff you have here! Cheers.
Hi,
Me too please on the rp. And thanks so much for sharing your Axure experience. I’m relatively new to axure but an experienced sharepoint guy so this is very helpful.
Very good tip.
Thanks ^^
Great tip! Thanks!
[...] Hey MarvinSmith and Paul, Not too long ago I stumbled upon this: Creating AJAX-style auto complete functionality within Axure prototypes – UPDATED | Business A… This is similar to what's being requested. This is not a dynamic auto complete – that is it only [...]
[...] (e.g. results shown on typing in the search field), you can use a technique similar to this one: Creating AJAX-style auto complete functionality within Axure prototypes – UPDATED | Business A… Essentially you will be hard coding a scenario but it should communicate the functionality [...]