Try enclosing your function by <unique>:
<unique>
function disableLinks(){
....
}
</unique>
Shing
--- Tim Sawyer <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a component, based on LinkSubmit, which
> generates a javascript
> function. As this function is the same each time, I
> don't really want to
> generate multiple copies of it in my page. Is this
> possible?
>
> My script file looks like this, and generates the
> javascript function each
> time the component is used in the page.
>
> <!DOCTYPE script PUBLIC
> "-//Apache Software Foundation//Tapestry
> Script Specification
> 3.0//EN"
>
>
"http://jakarta.apache.org/tapestry/dtd/Script_3_0.dtd
>
<http://jakarta.apache.org/tapestry/dtd/Script_3_0.dtd>
> ">
> <script>
>
> <input-symbol key="name" class="java.lang.String"
> required="yes"/>
> <input-symbol key="form"
> class="org.apache.tapestry.IForm" required="yes"/>
>
> <let key="funcName" unique="yes">disableFields</let>
>
> <let key="href">
>
>
javascript:disableLinks();Tapestry.submit_form('${form.name}',
> '${name}');
> </let>
>
> <body>
> function disableLinks()
> {
> var lAnchors = document.anchors;
>
> for ( var i=0; i<lAnchors.length; i++ )
> {
> var lElement = lAnchors[i];
> lElement.disabled = true;
> }
> return true;
> }
> </body>
>
> </script>
>
> Thanks,
>
> Tim.
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
Home page :
http://uk.geocities.com/matmsh/index.html
___________________________________________________________
The all-new Yahoo! Mail goes wherever you go - free your email address from
your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]