<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body bgcolor="#FFFFFF">
This is the structure of the "inline conditional" :
<p>
variable = condition ? value_if_true : value_if_false
<p>
it is equivalent to :
<p>
if(condition)
<br>
{
<br>
variable = value_if_true;
<br>
}
<br>
else
<br>
{
<br>
variable = value_if_false;
<br>
}
<br>
<p>
valueToYou=(Understood)?High:Zero // <G>
<p>Rodney
<p>David Levy wrote:
<blockquote TYPE=CITE><style></style>
<font size=-1>Hi, I was wondering
if anyone can make sense of this little snippet of code:</font> <font size=-1>y=(nav)?e.pageY:event.y+document.body.scrollTop;</font><font size=-1>skn.top=y+yyy;</font> <font size=-1>my
experience with javascript is very limited. Here's what I do know.
nav is a boolean variable, I believe skn is an object, and I understand
that there is some sort of assignment going on. What primarily confuses
me is the question mark(?) and the colon(:). The code comes from
a script written by Mike McGrath. Thank you to anyone willing to
take a look.</font> <font size=-1>David Levy</font></blockquote>
<p>--
<br>Shop@ssistant Add-ons and Developer Workshops
<br><A HREF="http://www.aflyingstart.net/addons/">http://www.aflyingstart.net/addons/</A>
<p>Enquiries regarding Shop@ssistant Classic training :
<br>Call 01256 880770
<p>Rodney Myers
<br>Based in Oxford, England
<br>Technical Director, Shop@ssistant eCommerce Solutions
<br>
</body>
</html>