apply style to InnerHTML

apply style to InnerHTML

am 01.08.2007 05:36:14 von rob.fahndrich









this code above "ComputerName.InnerHTML" formats my text as I would
like it to be. I would like to use something like the following to
format my text instead:


ComputerName.InnerHTML = "

" & objNet.ComputerName
& "

"


this code will not work and generates errors.
how can I use the .redtext class for my InnerHTML code???

Re: apply style to InnerHTML

am 01.08.2007 06:15:14 von John Hosking

rob.fahndrich@gmail.com wrote:
>
>
>

You've lost your . You're also missing the .<br /> <br /> > <br /> > <SCRIPT LANGUAGE="VBScript"><br /> <br /> I don't see this very often.<br /> <br /> > Sub GetInfoSub<br /> > Set objNet = CreateObject("WScript.NetWork")<br /> > ComputerName.InnerHTML = "<font face=Arial Size=4 color=blue>" &<br /> > objNet.ComputerName & "</font>"<br /> > End Sub<br /> <br /> See, this shows how weak I am in VBScript; what is ComputerName when you <br /> first reference it? And how does it get to be part of objNet (or is that <br /> a different one, part of the NetWork object)?<br /> <br /> > </SCRIPT><br /> > <br /> > this code above "ComputerName.InnerHTML" formats my text as I would<br /> > like it to be.<br /> <br /> Well, that's a happy surprise.<br /> <br /> > I would like to use something like the following to<br /> > format my text instead:<br /> > <br /> > ComputerName.InnerHTML = "<p class="redtext">" & objNet.ComputerName<br /> > & "</p>"<br /> > <br /> > this code will not work and generates errors.<br /> > how can I use the .redtext class for my InnerHTML code???<br /> <br /> What errors, then?<br /> What is the innerHTML supposed to be within? Your first example was <br /> inline content, now you're adding a <p> element. Where's the URL to the <br /> rest of the code?<br /> Have you tried different delimiters:<br /> ComputerName.InnerHTML = "<p class='redtext'>" & objNet.ComputerName<br /> & "</p>" ?<br /> <br /> -- <br /> John<br /> Pondering the value of the UIP: http://blinkynet.net/comp/uip5.html</p> </article> <article> <h2>Re: apply style to InnerHTML</h2><span>am 01.08.2007 06:18:50 von rf</span> <p><rob.fahndrich@gmail.com> wrote in message <br /> news:1185939374.302645.327180@d55g2000hsg.googlegroups.com.. .<br /> <br /> > ComputerName.InnerHTML = "<p class="redtext">" & objNet.ComputerName<br /> > & "</p>"<br /> <br /> <br /> ComputerName.InnerHTML = "<p class='redtext'>" & objNet.ComputerName & <br /> "</p>"<br /> <br /> -- <br /> Richard.</p> </article> <article> <h2>Re: apply style to InnerHTML</h2><span>am 13.08.2007 18:04:10 von rob.fahndrich</span> <p>On Aug 1, 12:18 am, "rf" <r...@invalid.com> wrote:<br /> > <rob.fahndr...@gmail.com> wrote in message<br /> ><br /> > news:1185939374.302645.327180@d55g2000hsg.googlegroups.com.. .<br /> ><br /> > > ComputerName.InnerHTML= "<p class="redtext">" & objNet.ComputerName<br /> > > & "</p>"<br /> ><br /> > ComputerName.InnerHTML= "<p class='redtext'>" & objNet.ComputerName &<br /> > "</p>"<br /> ><br /> > --<br /> > Richard.<br /> <br /> thank you. it was the ' not the " that worked...<br /> <br /> here is the code that I was working on:<br /> <br /> ------------------------------------------------------------ ---------<br /> <br /> <html><br /> <head><br /> <title>HTA Test
ID = "oApp"
APPLICATIONNAME = "TEST"
BORDER = "normal"
BORDERSTYLE = "normal"
CAPTION = "no"
ICON = "explorer.exe"
SHOWINTASKBAR = "no"
SINGLEINSTANCE = "yes"
SYSMENU = "no"
WINDOWSTATE = "normal"
SCROLL = "no"
SCROLLFLAT = "no"
VERSION = "1.2"
INNERBORDER = "yes"
SELECTION = "no"
MAXIMIZEBUTTON = "no"
MINIMIZEBUTTON = "no"
NAVIGABLE = "no"
CONTEXTMENU = "no"
>




















div>
































------------------------------------------------------------ ------------------------------------------------------------ ---

save as an .hta file
Thanks.

Re: apply style to InnerHTML

am 13.08.2007 18:06:20 von rob.fahndrich

On Aug 1, 12:15 am, John Hosking
wrote:
> rob.fahndr...@gmail.com wrote:
> >
> > .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.
>
> >
>
> >
>
> You've lost your . You're also missing the .<br /> ><br /> ><br /> ><br /> > > <SCRIPT LANGUAGE="VBScript"><br /> ><br /> > I don't see this very often.<br /> ><br /> > > Sub GetInfoSub<br /> > > Set objNet = CreateObject("WScript.NetWork")<br /> > > ComputerName.InnerHTML= "<font face=Arial Size=4 color=blue>" &<br /> > > objNet.ComputerName & "</font>"<br /> > > End Sub<br /> ><br /> > See, this shows how weak I am in VBScript; what is ComputerName when you<br /> > first reference it? And how does it get to be part of objNet (or is that<br /> > a different one, part of the NetWork object)?<br /> ><br /> > > </SCRIPT><br /> ><br /> > > this code above "ComputerName.InnerHTML" formats my text as I would<br /> > > like it to be.<br /> ><br /> > Well, that's a happy surprise.<br /> ><br /> > > I would like to use something like the following to<br /> > > format my text instead:<br /> ><br /> > > ComputerName.InnerHTML= "<p class="redtext">" & objNet.ComputerName<br /> > > & "</p>"<br /> ><br /> > > this code will not work and generates errors.<br /> > > how can I use the .redtext class for myInnerHTMLcode???<br /> ><br /> > What errors, then?<br /> > What is theinnerHTMLsupposed to be within? Your first example was<br /> > inline content, now you're adding a <p> element. Where's the URL to the<br /> > rest of the code?<br /> > Have you tried different delimiters:<br /> > ComputerName.InnerHTML= "<p class='redtext'>" & objNet.ComputerName<br /> > & "</p>" ?<br /> ><br /> > --<br /> > John<br /> > Pondering the value of the UIP:http://blinkynet.net/comp/uip5.html<br /> <br /> in fairness that was only a small snippet of the code. I was wanting<br /> to use a stylesheet to the innerHTML but am not real good with HTML.<br /> the ' did the trick, not the "<br /> here is the code that i am currently working on:<br /> <br /> ------------------------------------------------------------ ---------<br /> <br /> <html><br /> <head><br /> <title>HTA Test
ID = "oApp"
APPLICATIONNAME = "TEST"
BORDER = "normal"
BORDERSTYLE = "normal"
CAPTION = "no"
ICON = "explorer.exe"
SHOWINTASKBAR = "no"
SINGLEINSTANCE = "yes"
SYSMENU = "no"
WINDOWSTATE = "normal"
SCROLL = "no"
SCROLLFLAT = "no"
VERSION = "1.2"
INNERBORDER = "yes"
SELECTION = "no"
MAXIMIZEBUTTON = "no"
MINIMIZEBUTTON = "no"
NAVIGABLE = "no"
CONTEXTMENU = "no"
>




















div>
































------------------------------------------------------------ ------------------------------------------------------------ ---

thanks for pointing out the typo with the hex code for red not being
correct. I feel like a schmuck now.