Wrox Home  
Search P2P Archive for: Go

  Return to Index  

proasp_howto thread: Adding styling to RichTextField


Message #1 by "Christopher Cote" <cotec@s...> on Thu, 21 Feb 2002 15:10:40
If you look at

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/ref
erence/methods/setattribute.asp?frame=true

it tells you to put

oActive.setAttribute("className", "BBold")

Try this to see if it works


-----Mensaje original-----
De: Christopher Cote [mailto:cotec@s...]
Enviado el: viernes, 22 de febrero de 2002 14:34
Para: Pro ASP HowTo
Asunto: [proasp_howto] RE: Adding styling to RichTextField


Hi guys,
   Well, I've tried using the setAttribute method to set the styles, but
it still doesn't work.  I've tried a number of different things, none of
which worked at all.   Here's the code I used:

...
<style>
BBold {color:blue; font-weight:bold}
</style>

<script language="javascript">
function BlueBold() {
   var oActive;
   oActive=myRichText.document.activeElement;
   oActive.setAttribute("cssText", "BBold");
}

...
...
<iframe id="myRichText"  width=100% height=300></iframe>
<a href="#"  onClick="javascript:GetAttr();myRichText.focus
();"><button>Hello</button></a>

This code does not work, but if someone can figure out what I've done
wrong in this code please let me know.

Chris Cote
</script>
$subst('Email.Unsub').


  Return to Index