Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Actionscript to display HTML

Status
Not open for further replies.

xsw1971

Programmer
Jun 21, 2001
153
0
0
US
I am using a flash form in a ColdFusion application and am creating a variable using actionscript in order to display HTML in the form. I want to display form items as text instead of form items if the user doesn't have update rights. I found some code in a sample address book application but I can't get the HTML to format correctly.

My question is: how can I insert multiple tabs into text? When the text on the left of the tab is small enough it looks great but when it gets bigger it doesn't work. Here's an exmple:
Code:
{(
 ("<b>Category:</b>\t" + myForm.myField1) +
 ("<br><b>Type:</b>\t" + myForm.myField2) +
 ("<br><b>Model:</b>\t" + myForm.myField3) +
 ("<br><b>Acquisition Date:</b>\t" + myForm.myField4) +
 ("<br><b>Serial No:</b>\t" + myForm.myField5)
)}
Results in:
Code:
[b]Category:[/b]  Some Category
[b]Type:[/b]      Some Type
[b]Model:[/b]     Some Model
[b]Acquisition Date:[/b]Some Date
[b]Serial No:[/b] Some Serial No

I tried adding \t\t to the above code but it seems to ignore any tabs after the first one. Other than physically typing in enough spaces on each line to get the items to line up is there a way to force flash to recognize multiple tabs?

Thanks in advance!

BTW - I'm posting here instead of the CF forum because the question is specifically related to actionscript. They don't like that in CF! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top