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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format text

Status
Not open for further replies.

mazdaman

Programmer
Oct 17, 2003
55
GB
I have the following code and want to format the output text with a CSS style called 'whitetextsml'. Can anybody help ?

CODE------
<script language="JavaScript">
<!--
var stb_domain = "igd.uk.com"
var stb_user = "office"
var stb_recipient = stb_user + "@" + stb_domain
var stb_url = "mailto:" + stb_recipient
document.write(stb_recipient.link(stb_url));
// -->
</script>
 
document.write("<span class='whitetextsml'>"stb_recipient.link(stb_url)+"</span>");


Known is handfull, Unknown is worldfull
 
Thanks vbkris ...Ive tried that but still does not show.
Here is the full code.
<table width="999" height="74" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="340" background="images/homebotoomleft_14.gif"><table width="340" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30">&nbsp;</td>
<td class="whitetextsml">Indoor Garden Design<br>
Woodside Works, Sommersby Road, London N6 5UH<br>
T +44(0)20 84441414 F +44(0)20 84443414 E
<script language="JavaScript">
<!--
var stb_domain = "igd.uk.com"
var stb_user = "office"
var stb_recipient = stb_user + "@" + stb_domain
var stb_url = "mailto:" + stb_recipient
document.write("<span class='whitetextsml'>"stb_recipient.link(stb_url)+"</span>");
// -->
</script>
</td>
<td width="10">&nbsp;</td>
</tr>
</table
 
<table width="999" height="74" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="340" background="images/homebotoomleft_14.gif"><table width="340"

border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30">&nbsp;</td>
<td class="whitetextsml">Indoor Garden Design<br>
Woodside Works, Sommersby Road, London N6 5UH<br>
T +44(0)20 84441414 F +44(0)20 84443414 E
<script language="JavaScript">
<!--
var stb_domain = "igd.uk.com"
var stb_user = "office"
var stb_recipient = stb_user + "@" + stb_domain
var stb_url = "mailto:" + stb_recipient
document.write("<span

class='whitetextsml'>"+stb_recipient.link(stb_url)+"</span>");
// -->
</script>
</td>
<td width="10">&nbsp;</td>
</tr>
</table>



worked, i did not add a + sign,

anyway do u want the css to be applied to the mailto link itself? then u have to tell me what is stb_recipent...

Known is handfull, Unknown is worldfull
 
Yeah it needs to formt the 'mailto:' link.The 'stb_recipient' writes the email address from the items above it
 
try this:
<table width="999" height="74" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="340" background="images/homebotoomleft_14.gif"><table width="340" border="0"

cellspacing="0" cellpadding="0">
<tr>
<td width="30">&nbsp;</td>
<td class="whitetextsml">Indoor Garden Design<br>
Woodside Works, Sommersby Road, London N6 5UH<br>
T +44(0)20 84441414 F +44(0)20 84443414 E
<script language="JavaScript">
<!--
var stb_domain = "igd.uk.com"
var stb_user = "office"
var stb_recipient = stb_user + "@" + stb_domain
var stb_url = "mailto:" + stb_recipient
TheUrl=stb_recipient.link(stb_url).replace(/>/," class='whitetextsml'>")
document.write(TheUrl);
// -->
</script>
</td>
<td width="10">&nbsp;</td>
</tr>
</table>

Known is handfull, Unknown is worldfull
 
glad to be of help...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top