Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


InnerHTML Dynamic Update

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,38170
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> InnerHTML Dynamic Update
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 InnerHTML Dynamic Update - 9/28/2006 5:26:23 PM   
  takeda kozo

 

Posts: 83
Score: 0
Joined: 11/9/2005
Status: offline
Hey Guys,

Is there a way to dynamically update the color assigned to an innerHTML value ? (depending on the value returned from the VB script ?)

Basically, if strRights = "ADM" then I want the text to appear as RED. If not, then just plain old WHITE.  Any ideas ?


=====================================================

<Script>

If strRights = "STD" Then
  DA_Local_Admin.InnerHTML = "Standard User"
ElseIf strRights = "ADM" Then
  DA_Local_Admin.InnerHTML = "Administrator"
End If


<Body>

<td width=590 valign="top"><span id=DA_Local_Admin></span></td>
 
 
Post #: 1
 
 RE: InnerHTML Dynamic Update - 9/28/2006 7:55:02 PM   
  ginolard


Posts: 1082
Score: 21
Joined: 8/10/2005
Status: offline
Yup


      

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to takeda kozo)
 
 
Post #: 2
 
 RE: InnerHTML Dynamic Update - 9/28/2006 9:07:24 PM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
don't forget the closing TAG

"<font color=" & chr(34) & "white" & chr(34) & "> Standard User </font>"
"<font color=" & chr(34) & "red" & chr(34) & "> Administrator </font>"

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to ginolard)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> InnerHTML Dynamic Update Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts