473,326 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Replace link name in a href with the contents of a variable>

1
Hi,

I am trying to use subscripted text in the link name. I created a variable which shows the link name as I want to display but when I use the variable, it just shows the variable name without its contents. I am new to actionscript so any help would be appreciated.

my code is:

<mx:Script>
<![CDATA[
[Bindable]
public var myString:String;
[Bindable]
public var myLink:String;

private function insertSuperscriipt():void{
myString= "C<sup>2</sup> S<sup>2</sup>";
var supStartExpression:RegExp = new RegExp ("<sup>", "g")
var supEndExpression:RegExp = new RegExp("</sup>", "g")

myString = myString.replace(supStartExpression, "<font face=\"Arial_DH_SUP\">")
myString = myString.replace(supEndExpression, "</font>")
myString = myString + ' ' + 'Contact Center Scorecard System';

myLink = "<a href='\\\\Snt007\\repository\\Install\\C2S2'>'{myS tring}'</a>";

textObject.htmlText = myLink ;
}
]]>
</mx:Script>
Dec 6 '11 #1
0 1286

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Sorby | last post by:
Hi I've been coding in PHP for a little while now and was starting to feel pretty confident but then realise I need to understand regular expressions to solve a particular problem I've got ......
2
by: José Carlos Santos | last post by:
Hi all, If you are using IE, Netscape, Mozilla or, I would guess, several other browsers, and if you put the cursor over a link (without clicking) you can see the address of the new web page at...
4
by: lkrubner | last post by:
PHP has a function called nl2br() which takes all the newlines in a string and turns them into break tags <br>. I need to do the same in javascript. Is this about right? I'm not sure how one is...
6
by: Mason A. Clark | last post by:
LAST WORD(s): 1. MSIE6 and Firefox will go to the top of the page on command <a href="#top">go upsy</a> even if there is NO name="top" or id="top" They know what a "top" is :-) Opera...
16
by: Gufus | last post by:
Hi Group... <a name="#top"></a> ----del---- ----del---- <img SRC="images/top.gif" USEMAP="#top" BORDER=0> <map NAME="top">
8
by: Jim Moon | last post by:
Hi. I'm curious about this syntax: <variable>=function(){...} I'm not finding a definition of this syntax, but I see it used at this website:...
3
by: Islam Elkhayat | last post by:
Hello everybody Ihave few .CSS files, I let user select the color schema of the whole site using a radiobutton and save it in a cookie.. I want to retrieve the value of the cookie <link href=" ...
0
by: Emil Christopher Melar | last post by:
I wanted to use App_Theme, because then I might have some automation when it comes to not hard coding paths for the css. And as you know, you know that mozilla and IE renders differently, and...
2
by: Peter Laman | last post by:
In my app I need to dynamically generate a series hyperlinks. Each hyperlink's action must be to focus a field in a <form>. I created the following function to create such a link (the argument is a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.