You can use an a tag in htmlText to emit a textEvent, to call a
function.

This should get yo 90% of the way:

http://www.cflex.net/showfiledetails.cfm?ChannelID=1&Object=File&objectI
D=595

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of thegators_2002
Sent: Tuesday, January 16, 2007 12:16 PM
To: [email protected]
Subject: [flexcoders] Hyperlinks in text that call a function, not a URL

 

I am trying to add dialog boxes to my app that contain help text. The
user clicks something in the UI, and the dialog pops up. In it, there
will be some text that says, for example "This value is found by
multiplying a net income of $2,000,000 by a growth rate of 7.5%". I
want to make the numbers "$2,000,000" and "7.5%" to look like
hyperlinks, so that when a user clicks them, the text in the text area
changes to explain how those numbers were arrived at.

I thought of making the whole text area respond to a click event, but
in many cases I will have two or three links, which would mean two or
three different text blocks that should appear. If the whole text
area responds to a click event, I do not know how to tell what link
the user clicked. I also tried using Anchor tags in htmlText, but
those want to link to a URL or another anchor. Ideally, I would like
to specify a link in the text that calls a function, so I can tell
what link was clicked and then change the text in the dialog
accordingly.

Is there any way to do this, add a link to a function in my code,
rather than a URL?

Thanks,
Pete

 

Reply via email to