I wish to uniquely identify the below button element embedded
among many other button elements in a web page and call the click
event on it to automatically navigate to the next page in a
sequence of pages. Similar in action to automated login.
<INPUT class=submitn onclick="window .location='/newstuff?
newstuffupdate= prefs&type= cfilter&ind ex=1&from=z zyzx'"
type=button value="Search Now">
Since the above button element has no id or name tag I can't see
any way of success with;
var tag=document.ge tElementById("f oo").click()" ;
Also, if it matters, this input element and many others of the
class=submitn are not wrapped in a <form</formblock, they do
all reside in a <div</divblock.
does have a close approximation of what could be used.
Under heading - getElementsByNa me(name)
<div name="george">f </div>
<div name="george">f </div>
<script type="text/javascript">
var georges=documen t.getElementsBy Name("george")
for (i=0; i< georges.length; i++)
// do something with each DIV tag with name="george". Firefox only.
</script>
but the above still leaves the identification of the input
button unsolved.
Any insights or suggestions?
among many other button elements in a web page and call the click
event on it to automatically navigate to the next page in a
sequence of pages. Similar in action to automated login.
<INPUT class=submitn onclick="window .location='/newstuff?
newstuffupdate= prefs&type= cfilter&ind ex=1&from=z zyzx'"
type=button value="Search Now">
Since the above button element has no id or name tag I can't see
any way of success with;
var tag=document.ge tElementById("f oo").click()" ;
Also, if it matters, this input element and many others of the
class=submitn are not wrapped in a <form</formblock, they do
all reside in a <div</divblock.
does have a close approximation of what could be used.
Under heading - getElementsByNa me(name)
<div name="george">f </div>
<div name="george">f </div>
<script type="text/javascript">
var georges=documen t.getElementsBy Name("george")
for (i=0; i< georges.length; i++)
// do something with each DIV tag with name="george". Firefox only.
</script>
but the above still leaves the identification of the input
button unsolved.
Any insights or suggestions?
Comment