You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Grinvald, Edward" <ED...@ca.com> on 2002/06/11 16:17:35 UTC

Setting for in javascript

Hello all,
    I'm trying to write a <script> in javascript that will make an antcall.
I know i can set the attributes using the setXXX,but is tehre any way for me
to set the <param> being passed to the target?
 
Thank You,
 
Edward Grinvald
Computer Associates International
Programmer, Storage Development
Edward.Grinvald@ca.com <ma...@ca.com> 
1-631-342-6000 x76350
 

Re: Setting for in javascript

Posted by Diane Holt <ho...@yahoo.com>.
--- "Grinvald, Edward" <ED...@ca.com> wrote:
> I'm trying to write a <script> in javascript that will make an
> antcall. [...] is tehre any way for me to set the <param> being
> passed to the target?

  <target name="caller">
    <script language="javascript"> <![CDATA[
      ac = project.createTask("antcall");
      ac.setTarget("callee");
      acparam=ac.createParam();
      acparam.setName("param");
      acparam.setValue("hi there");
      ac.execute();
      ]]>
    </script>
  </target>

  <target name="callee">
    <echo>${param}</echo>
  </target>

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>