170
rated 0 times
[
172]
[
2]
/ answers: 1 / hits: 16041
/ 10 Years ago, tue, may 20, 2014, 12:00:00
I need to be able to set a var with the number of open orders on a website I use.
Warning:
This site, for some reason, uses the same ids over and over again per order, but as this is not my site, I can not change that.
code of my current orderlist:
<div id=orderlist>
<label id=l61>05/19/2014 08:57:34</label>
<label id=l62>0.00066000</label>
<label id=l63>Buy</label>
<label id=l64>6</label>
<label id=l64>6</label>
<label id=l62>0.00396000</label>
<label id=l65 onclick=cancelOrder(346046);>Cancel</label>
<div id=b1></div>
<label id=l61>05/19/2014 03:08:35</label>
<label id=l62>0.00078000</label>
<label id=l63>Sell</label>
<label id=l64>2</label>
<label id=l64>1</label>
<label id=l62>0.00078000</label>
<label id=l65 onclick=cancelOrder(38493);>Cancel</label>
<div id=b1></div>
<label id=l61>05/19/2014 03:12:08</label>
<label id=l62>0.00076000</label>
<label id=l63>Sell</label>
<label id=l64>14</label>
<label id=l64>14</label>
<label id=l62>0.01064000</label>
<label id=l65 onclick=cancelOrder(38495);>Cancel</label>
<div id=b1></div>
<label id=l61>05/19/2014 03:13:49</label>
<label id=l62>0.00077000</label>
<label id=l63>Sell</label>
<label id=l64>15</label>
<label id=l64>15</label>
<label id=l62>0.01155000</label>
<label id=l65 onclick=cancelOrder(38497);>Cancel</label>
<div id=b1></div> </div>
</div>
What I'd need to do basically, is count the number of ids l65. Or another id, it doesn't matter, they are all used each time a new order is added.
What would be the easiest way to do this? I'd need this number in a var, so that I can perform functions based on that number.
More From » count