Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Ampersand in context menu problem

New Here ,
Nov 22, 2006 Nov 22, 2006
Is there anyway to get the ampersand to show in the context menu. It's a simple string and I don't understand why it sees the ampersand as code instead of text. I've attached the affected code. Please help a newbie out!
Thanks!
JK
TOPICS
ActionScript
743
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 22, 2006 Nov 22, 2006
If the caption contains an ampersand, the character following the ampersand
is underlined to indicate a keyboard mnemonic.

Use two ampersands: "&&".


Translate
LEGEND ,
Nov 22, 2006 Nov 22, 2006
If the caption contains an ampersand, the character following the ampersand
is underlined to indicate a keyboard mnemonic.

Use two ampersands: "&&".


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 27, 2006 Nov 27, 2006
LATEST
Use two ampersands: "&&".

Simple and effective. Thanks!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Nov 22, 2006 Nov 22, 2006
Sure. There are several reasons why it may not be reading. the Ampersand is a special character (one of several) and often does not get interpreted as a 'string' character.

First, is this a dynamic text field? If so, you may need to embed the special character set which includes the ampersand.

Second (and first method to try), you may be able to 'escape' the character by preceeding it in your string using the ' \ ' or backslash just before the & ...

"©2006 Name \& Name" ... like so.

if that doesn't work then you need to describe the character using the ASCII code and adding the "fromCharCode()" command as in ...

"©2006 Name " +String.fromCharCode(38)+ " Name"

you use the ACSII number for whatever character you want within the (). '38' happens to be the code for an ampersand.

hope this helps.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines