Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


cgetElementByID shortcut operator vbscript

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> cgetElementByID shortcut operator vbscript
  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 >>
 cgetElementByID shortcut operator vbscript - 11/7/2008 9:08:03 AM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
I would like to know how to deal with multiple IDs with vbscript if possible. For instance I think this can be done in Javascript like this getElementByID(("id1" || "id2")). Can something like this be done with vbscript?
 
 
Post #: 1
 
 RE: cgetElementByID shortcut operator vbscript - 11/7/2008 10:02:49 AM   
  TNO


Posts: 1402
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
I don't think any VB language supports this.

Well, VB.NET kinda does, but it has more logic operators than you can shake a stick at.

Can you give a little more info? there may be an alternative that doesn't require a butt load of code

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to TKS)
 
 
Post #: 2
 
 RE: cgetElementByID shortcut operator vbscript - 11/7/2008 11:42:45 AM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
Certainly TNO! .......

Here's what I'm dealing with:

window.document.getElementById("idab76d").innerHTML = ""
window.document.getElementById("idb7e6e").innerHTML = ""
window.document.getElementById("idd7c").innerHTML = ""
window.document.getElementById("ids65d").innerHTML = ""
window.document.getElementById("ide56fe").innerHTML = ""
window.document.getElementById("id5fg").innerHTML = ""
window.document.getElementById("idr4g").innerHTML = ""
window.document.getElementById("idh3gf").innerHTML = ""
window.document.getElementById("idf423i").innerHTML = ""
window.document.getElementById("idd2f").innerHTML = ""
window.document.getElementById("idfe1").innerHTML = ""

Heres what I hope for:

window.document.getElementById("idab76d", "idb7e6e", "idd7c", "ids65d", "ide56fe", "id5fg", "idr4g", "idh3gf", "idf423i", "idd2f", "idfe1").innerHTML = ""

(in reply to TNO)
 
 
Post #: 3
 
 RE: cgetElementByID shortcut operator vbscript - 11/7/2008 12:18:19 PM   
  TNO


Posts: 1402
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
You could do something like this:


      

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to TKS)
 
 
Post #: 4
 
 RE: cgetElementByID shortcut operator vbscript - 11/7/2008 12:21:35 PM   
  TKS


Posts: 187
Score: 0
Joined: 5/16/2008
Status: offline
Wooooooooow now thats what I call thinking on two! Arrays where did I go wrong!

(in reply to TNO)
 
 
Post #: 5
 
 RE: cgetElementByID shortcut operator vbscript - 11/7/2008 12:22:46 PM   
  TNO


Posts: 1402
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
in JavaScript it would have been something like this:


      

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to TNO)
 
 
Post #: 6
 
 
 
  

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 >> cgetElementByID shortcut operator vbscript 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