# HTML Help!

**URL:** <https://forums.speedlife.net/t/html-help/68687>\
**Category:** NYSpeed Off Topic\
**Created:** [June 3, 2009, 5:21am UTC](https://forums.speedlife.net/t/html-help/68687 "2009-06-03T05:21:33Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fry](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/fry/32/7284_2.png) [@Fry](https://forums.speedlife.net/u/Fry)\
**Post date:** [June 3, 2009, 5:21am UTC](https://forums.speedlife.net/t/html-help/68687/1 "2009-06-03T05:21:33Z")

</div>

God bless industrial programming. I need to display a data table with a less than 2 kb html file. Can I write a loop command in html? Something like:

For i=1 to 255  
Ul \<ai\> \<bi\> \<ci\> \<br\>

Can it be done? Maybe via javascript?

---

<div class="post-metadata">

**Author:** ![badazzss](https://avatars.discourse-cdn.com/v4/letter/b/e19adc/32.png) [@badazzss](https://forums.speedlife.net/u/badazzss)\
**Post date:** [June 3, 2009, 5:42am UTC](https://forums.speedlife.net/t/html-help/68687/2 "2009-06-03T05:42:36Z")

</div>

? [http://www.ryerson.ca/JavaScript/lectures/flowControl/loops/writingTables/simpleTable.html](http://www.ryerson.ca/JavaScript/lectures/flowControl/loops/writingTables/simpleTable.html)

---

<div class="post-metadata">

**Author:** ![Fry](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/fry/32/7284_2.png) [@Fry](https://forums.speedlife.net/u/Fry)\
**Post date:** [June 3, 2009, 5:46am UTC](https://forums.speedlife.net/t/html-help/68687/3 "2009-06-03T05:46:22Z")

</div>

Awesome. I might be able to make that work.

---

<div class="post-metadata">

**Author:** ![Fry](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/fry/32/7284_2.png) [@Fry](https://forums.speedlife.net/u/Fry)\
**Post date:** [June 3, 2009, 6:13am UTC](https://forums.speedlife.net/t/html-help/68687/4 "2009-06-03T06:13:47Z")

</div>

sonofabitch. I’m so close.

I want a variable to go like this:

\<!ABDTR-F132:0\>  
\<!ABDTR-F132:1\>  
\<!ABDTR-F132:2\>  
etc.

If I set up a for loop

for (i=0;i\<=10;i++)

What the fuck is the right syntax to stick that i into my variable?!

\<!ABDTR-F132:i\> doesn’t work no matter where I try sticking + or " or spaces.

I hate coding!

---

<div class="post-metadata">

**Author:** ![drvnkd](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/drvnkd/32/109615_2.png) [@drvnkd](https://forums.speedlife.net/u/drvnkd)\
**Post date:** [June 3, 2009, 6:19am UTC](https://forums.speedlife.net/t/html-help/68687/5 "2009-06-03T06:19:29Z")

</div>

Just don’t accidentally your variable.

---

<div class="post-metadata">

**Author:** ![drvnkd](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/drvnkd/32/109615_2.png) [@drvnkd](https://forums.speedlife.net/u/drvnkd)\
**Post date:** [June 3, 2009, 6:26am UTC](https://forums.speedlife.net/t/html-help/68687/6 "2009-06-03T06:26:24Z")

</div>

all the example code from the link show ’ + i + ’ with the single quote line thing.  
??

---

<div class="post-metadata">

**Author:** ![Fry](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/fry/32/7284_2.png) [@Fry](https://forums.speedlife.net/u/Fry)\
**Post date:** [June 3, 2009, 6:40am UTC](https://forums.speedlife.net/t/html-help/68687/7 "2009-06-03T06:40:15Z")

</div>

No dice. that \<!ABDTR-F132:0\> is for directly addressing allen bradley plc data tables. It seems like there’s no way to turn the 0 into a variable without fucking up the AB function. Uggh.

---

<div class="post-metadata">

**Author:** ![drvnkd](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/drvnkd/32/109615_2.png) [@drvnkd](https://forums.speedlife.net/u/drvnkd)\
**Post date:** [June 3, 2009, 6:42am UTC](https://forums.speedlife.net/t/html-help/68687/8 "2009-06-03T06:42:10Z")

</div>

[http://forums.mrplc.com/](http://forums.mrplc.com/)  
Maybe someone there would know of a way.

---

<div class="post-metadata">

**Author:** ![badazzss](https://avatars.discourse-cdn.com/v4/letter/b/e19adc/32.png) [@badazzss](https://forums.speedlife.net/u/badazzss)\
**Post date:** [June 3, 2009, 7:16am UTC](https://forums.speedlife.net/t/html-help/68687/9 "2009-06-03T07:16:30Z")

</div>

can you use php? or just html/javascript?

---

<div class="post-metadata">

**Author:** ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)\
**Post date:** [June 3, 2009, 7:23am UTC](https://forums.speedlife.net/t/html-help/68687/10 "2009-06-03T07:23:25Z")

</div>

php ftw

I hate web development, most frustrating thing ever

---

<div class="post-metadata">

**Author:** ![badazzss](https://avatars.discourse-cdn.com/v4/letter/b/e19adc/32.png) [@badazzss](https://forums.speedlife.net/u/badazzss)\
**Post date:** [June 3, 2009, 7:32am UTC](https://forums.speedlife.net/t/html-help/68687/11 "2009-06-03T07:32:04Z")

</div>

if you can use php, i can give the code for making the entire \<!ABDTR-F132:0\> string a variable… and then the last digit will increase along with the counter.

other dynamic languages (like asp) will work also, maybe even another way with JS, but i’m only familiar w/ php.

---

<div class="post-metadata">

**Author:** ![Fry](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/fry/32/7284_2.png) [@Fry](https://forums.speedlife.net/u/Fry)\
**Post date:** [June 3, 2009, 7:55am UTC](https://forums.speedlife.net/t/html-help/68687/12 "2009-06-03T07:55:40Z")

</div>

FML. I figured out how to do it, but it just won’t interface with the PLC. For example, the code below returns

0  
1  
2

\<script type=“text/javascript”\>

jim0fry = 0  
jim1fry = 1  
jim2fry = 2

i=0  
for (i=0;i\<3;i++)  
{  
var fryrules = window[‘jim’ + i + ‘fry’]  
document.write(fryrules);  
document.write("\<br /\>");  
}

\</script\>

---

<div class="post-metadata">

**Author:** ![Fry](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/fry/32/7284_2.png) [@Fry](https://forums.speedlife.net/u/Fry)\
**Post date:** [June 3, 2009, 7:57am UTC](https://forums.speedlife.net/t/html-help/68687/13 "2009-06-03T07:57:27Z")

</div>

But if I do the same thing to try to print the values of \<!ABDTR-F132:0\>, \<!ABDTR-F132:1\>, and \<!ABDTR-F132:2\> I get undefined. So it’s fucked.
