Reply to Re: apply style to InnerHTML

Your name:

Reply:


Posted by John Hosking on 08/01/07 04:15

rob.fahndrich@gmail.com wrote:
> <style type="text/css">
> .bluetext {font-family: Comic Sans MS; font-size: 18pt; color:
> #000066;text-decoration: none;}

Points? Is this a print stylesheet? In color??

> .redtext {font-family: Comic Sans MS; font-size: 18pt; color:
> #000066;text-decoration: none;}

Nothing red about #000066.

> </style>
>
> </head>

You've lost your <head>. You're also missing the <title>.

>
> <SCRIPT LANGUAGE="VBScript">

I don't see this very often.

> Sub GetInfoSub
> Set objNet = CreateObject("WScript.NetWork")
> ComputerName.InnerHTML = "<font face=Arial Size=4 color=blue>" &
> objNet.ComputerName & "</font>"
> End Sub

See, this shows how weak I am in VBScript; what is ComputerName when you
first reference it? And how does it get to be part of objNet (or is that
a different one, part of the NetWork object)?

> </SCRIPT>
>
> this code above "ComputerName.InnerHTML" formats my text as I would
> like it to be.

Well, that's a happy surprise.

> I would like to use something like the following to
> format my text instead:
>
> ComputerName.InnerHTML = "<p class="redtext">" & objNet.ComputerName
> & "</p>"
>
> this code will not work and generates errors.
> how can I use the .redtext class for my InnerHTML code???

What errors, then?
What is the innerHTML supposed to be within? Your first example was
inline content, now you're adding a <p> element. Where's the URL to the
rest of the code?
Have you tried different delimiters:
ComputerName.InnerHTML = "<p class='redtext'>" & objNet.ComputerName
& "</p>" ?

--
John
Pondering the value of the UIP: http://blinkynet.net/comp/uip5.html

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация