[Xerte] Styling text entry fields and setting focus

Paul Swanson Paul.Swanson at harlandfs.com
Fri Jul 25 22:11:46 BST 2008


Update:
 
I've been able to get the look I want, set focus, and designate the
field as a password field by using a V2 TextInput component, but now I
can't get the control off the screen. I can't seem to Tab or Enter out
of the field. I based the setup on the V2Components example, and found
that if you try to use 'change' as the event, only 1 character at a time
appears in the text field. But if I use 'enter' (also tried: Enter,
onEnter, blur, Blur, onBlur, onKillFocus, KillFocus) as the event you
can continue to type characters, but nothing happens when you press Tab
or Enter. The interaction never seems to exit unless I use 'change' as
the event with InteractionId.exit(), but then I only capture the first
character typed. What is the name of the event I should be using if I
want to use Tab or Enter as the action key?
 
I'm also unsure of how to remove the control from the screen once you've
Entered or Tabbed out of the field. I guess I could use a framework for
that, and just navigate to the next page of the framework.
 
Paul


________________________________

	From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Paul Swanson
	Sent: Friday, July 25, 2008 11:23 AM
	To: Xerte discussion list
	Subject: [Xerte] Styling text entry fields and setting focus
	
	

	I'm building a login page, and I'm having trouble getting the
Text Entry fields to look and work the way I want them too.

	I'm using a regular text entry response, but the text field does
not have a white background (page background color is a light blue).
I've tried using a script icon with the following:

	pword.pw.background = true; 
	pword.pw.backgroundColor = 0xFF0000; 
	pword.pw.password = true; 

	Where pword is the interaction id, and pw is the rs property of
the text entry response. This is in an Event response attached to the
same Interaction as the text entry response. I'm using an event of
onInit with the icon set to pword, but have also tried setting it to pw.
The text entry field is displayed, but the background of the text field
is the same color as the stage, and text typed into the field is visible
as entered, not masked by the password property. I also want to set the
focus to the text entry fields, but setFocus() doesn't seem to have an
effect.

	So how would I do this? It seems I would have to use a script
icon after the response has loaded, but I don't want the interactions to
be perpetual if I can avoid it. Do I use an event response like my above
does, or can I somehow have a setup script on the login page that sets
the styles before the text entry fields are set up?

	_____________________________ 

	 Paul Swanson 
	 Instructional Designer 
	 Harland Financial Solutions 
	_____________________________ 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20080725/a895545e/attachment.html


More information about the Xerte mailing list