Space between appended items

build learning interactivity

Moderator: Nav

Space between appended items

Postby rwicker » Mon Sep 22, 2008 9:21 am

Hello,

I'm trying to append a learner's first and last names in a text item on a page with a space between them. The learner types in each of these in input text and clicks on a Submit button. Then both the first and last name should display in place of a text item. My results show the first and last name without a space, even though a space was also appended. An image is attached showing the appended items. The second line should show one blank space (lost focus when grabbing image, so blank space doesn't display). How may I add a space between the first and last names in one text item?

Thank you,
Rebecca
Attachments
append_space.tiff
append_space.tiff (23.54 KiB) Viewed 7364 times
rwicker
 
Posts: 98
Joined: Tue Jul 22, 2008 1:20 pm

Re: Space between appended items

Postby Nav » Mon Sep 22, 2008 10:24 am

Yes this is a little bit annoying, but luckily there's an easy work around. Unfortunately, Flash removes any spaces that appear at the beginning or end of words, or even empty append fields like you have in your example. The work around is to place another text object somewhere off the stage and just put a single space in it, and call the object "spaceholder" or something. Then you can append that text object between the first and last name. The text object with the space doesn't disappear.

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: Space between appended items

Postby rwicker » Mon Sep 22, 2008 10:37 am

Perfect. I should have thought of that. We did something similar back in my old Lingo days. :-)

Thanks for the quick response.
Rebecca
rwicker
 
Posts: 98
Joined: Tue Jul 22, 2008 1:20 pm

Re: Space between appended items

Postby Dan » Thu Dec 05, 2013 12:53 pm

Just wanting to drop a note that this is still the best way to add a space when appending two variables together. I just did it and it works nicely :)
Dan
 
Posts: 10
Joined: Sat Mar 27, 2010 9:05 am


Return to Action/Flow Chart/Variable

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Not able to open ./cache/data_global.php