Nathan Andelin wrote:
Joe Pluta wrote:
But you don't need a toolkit. EGL does it for you.

You don't need a toolkit? EGL is a toolkit. I don't follow the logic.
No, EGL is a language. In fact, it's a platform independent model (PIM) that generates platfrorm-specific models (PSMs) based on target. That's one of the true powers of the language.

I'll show you the code generated by Dreamweaver when you insert a radio group on a form:

<form name="form" method="post" action="">
<label><input type="radio" name="rg" value="0">Dogs</label>
<label><input type="radio" name="rg" value="1">Cats</label>
<label><input type="radio" name="rg" value="2">Birds</label>
<label><input type="radio" name="rg" value="3">Iquanas</label>
</form>

I'd add the following statement in a <script> tag:

document.forms[0].rg[{{creature}}].checked = true;

In the RPG program I'd write:

wtnFldSet('creature':%char(creature));

"creature" is the name of the database field containing a value of 0-3.
Now, how would someone who didn't understand HTML and JavaScript do this? You have to know DreamWeaver, JavaScript, HTML, the DOM and CGIDEV2 to do this. Every time I ask something difficult, you immediately jump to JavaScript.


I'd be interested to see what you see as the difference between
a CGI substitution tag, a tag in a framework like Tapestry.

Just consider the example above. If you understand that wtnFldSet() inserts a program variable in the page location delimited by {{creature}}, then there's essentially nothing more to explain.
It's a tag. It's a tag substitution. In JSP it looks like this:

document.forms[0].rg[<%= bean.creature %>].checked = true;

There is no difference.


Following is a derivative of a radio group. How would you do it in EGL? Would drag & drop, point & click, fill in the blank methods apply? Enjoy!

http://www.radile.com/rdweb/temp/rg.html
This is not an RPG-CGI example, it's a JavaScript example. As you get farther in your argument, you get farther away from RPG-CGI. Everything you're showing us requires some in-depth understanding of both JavaScript and the Document Object Model. I can use all of that in my EGL code if need be, but that's not what we're talking about.

My point is and always has been that pure RPG-CGI (that is, static HTML with data plugged in from RPG) is not sufficient. And that if you need to learn JavaScript, you might want to consider EGL, since it hides most of the complexity.

For example, let's show people how much you had to do to get that picture to change:

<html>
<head>
<title>Radio Group</title>
<style>
.dogs {
background-image:url(dog.jpg);
background-repeat:no-repeat;
}
.cats {
background-image:url(cat.jpg);
background-repeat:no-repeat;
}
.birds {
background-image:url(bird.jpg);
background-repeat:no-repeat;
}
.iquanas {
background-image:url(iguana.jpg);
background-repeat:no-repeat;
}
</style>
<script language="javascript">
function sb(alias) {
pic.className = alias;
}
</script>
</head>
<body>
<form name="form1" method="post" action="">
<table cellspacing="2" cellpadding="2">
<tr height="25">
<td><input type="radio" name="rg" value="0" onClick="sb('dogs')">&nbsp;Dogs</td>

<td align="right">Cats&nbsp;<input type="radio" name="rg" value="1" onClick="sb('cats')"></td>
</tr>
<tr>
<td id="pic" colspan="2" height="100">&nbsp;</td>
</tr>
<tr height="25">
<td><input type="radio" name="rg" value="2" onClick="sb('birds')">&nbsp;Birds</td>
<td align="right">Iguanas&nbsp;<input type="radio" name="rg" value="3" onClick="sb('iquanas')"></td>

</tr>
</table>
</form>
</body>
<script language="javascript">
pic = document.getElementById("pic");
document.forms[0].rg[0].checked = true;
sb('dogs');
</script>

</html>


Joe

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.