 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
Patrick
Joined: 20 Dec 2004 Posts: 1
|
Posted: Mon Dec 20, 2004 3:25 pm GetButtonCtrl when no ID, name, or value if specified in the |
|
|
|
How do you get the name, ID, or value of a button in an HTML page when none is specified? I am trying to GetButtonCtrl (VBScript function) but cannot get the ID, name, of value of the button on the web page?
Please help me understand this better.
Patrick |
|
kanenas

Joined: 14 Dec 2004 Posts: 191
|
Posted: Fri Jan 07, 2005 7:30 am Need clarification. |
|
|
|
When you say a button has no name, ID, or value, do you mean defined like one of:
| Code: |
<input type='button'></input>
<button />
|
If so, there are a few ways I can think of. Iterate over:
- document.getElementsByTagName('input') or document.getElementsByTagName('button')
- document.forms[f].childNodes, where 'f' is the id or index of the form containing the button (if such exists), until you find the button you seek.
- btnParent.childNodes, where btnParent is the node containing the button (gotten by document.getElementById(btnParentId), or by recursively finding the parent of btnParent or some other method)
I assume you're not working a page you have write access to and cannot add an id to the button.
Are you sure GetButtonCtrl is a part of the VBScript API and not VB? |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|