<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hello,<br><br>I'm trying to convert my js strings into parenscript code but I've a problem.<br><br>1) This works<br>(ps::ps <br> (ps::chain $ <br> (post jsonServerUrl <br> (if (ps::@ data error)<br> (alert (ps::@ data error))<br> (progn<br> (alert "test1")<br> (alert "test2")<br> )))))<br>2) This works<br>(ps::ps<br> (if (ps::@ data error)<br> (alert (ps::@ data error))<br> (loop for i from 0 to arLen<br> do<br> (ps::chain newil <br> (setAttribute "class" <br> (if (= (ps::@ (ps:getprop data i) typedonnee) "tabgrouptype")<br> "ui-state-default" <br> "ui-state-default no-nest")) <br><br> ))))<br><br>3) but this doesn't work (the if clause of first example if replaced by the if clause of the second one)<br>(ps::ps<br> (ps::chain $ <br> (post jsonServerUrl <br> (if (ps::@ data error)<br> (alert (ps::@ data error))<br> (loop for i from 0 to arLen<br> do<br> (ps::chain newil <br> (setAttribute "class" <br> (if (= (ps::@ (ps:getprop data i) typedonnee) "tabgrouptype")<br> "ui-state-default" <br> "ui-state-default no-nest")) <br> ))))))<br><br>Is there something wrong with my code?<br><br>Thanks<br><br>FD<br><br> </body>
</html>