You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alberto Brosich <ab...@ogs.trieste.it> on 2007/06/12 10:44:16 UTC
Importing a javascript file in cform
I need a javascript function written by myself in some widgets of a form.
I think the better solution is to put the function definition in one
file imported in the <head> portion of the form page so I can use the
function in every widget. But I don't known how can I do it, or an
alternative solution without change cform stylesheets (solution I don't
like).
Thank's in advance
Alberto Brosich
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Importing a javascript file in cform
Posted by Alberto Brosich <ab...@ogs.trieste.it>.
Dev at weitling wrote:
> Alberto Brosich wrote:
>
>>> I think it's tiem to ask the question: Should this javascript run
>>> client- or server-side?
>>>
>
>
>>> Client-side. I have to use the function in the "<fd:on-value-changed>"
>>> tag of some widgets.
>>>
>>>
>
> Then - afaik - it's server-side! Doubt it? Then just put a
>
It works, so now I don't doubt. :-)
It shows my poor knowledge of cform, as many other things, of course. :-)
Thanks to all
Alberto
> print("hello") below fd:on-value-changed/fd:javascript and change
> something. There should be a message on the shell for you :-)
> And so it should be as Thomas wrote - put it in a .js-file and include
> it in the sitemap.
>
> Bye,
> Florian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Importing a javascript file in cform
Posted by Dev at weitling <de...@weitling.net>.
Alberto Brosich wrote:
>> I think it's tiem to ask the question: Should this javascript run
>> client- or server-side?
>> Client-side. I have to use the function in the "<fd:on-value-changed>"
>> tag of some widgets.
>>
Then - afaik - it's server-side! Doubt it? Then just put a
print("hello") below fd:on-value-changed/fd:javascript and change
something. There should be a message on the shell for you :-)
And so it should be as Thomas wrote - put it in a .js-file and include
it in the sitemap.
Bye,
Florian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Importing a javascript file in cform
Posted by Alberto Brosich <ab...@ogs.trieste.it>.
Dev at weitling wrote:
> Hi Alberto,
>
> I think it's tiem to ask the question: Should this javascript run
> client- or server-side?
>
Client-side. I have to use the function in the "<fd:on-value-changed>"
tag of some widgets.
Alberto
> Bye,
> Florian
>
> Alberto Brosich wrote:
>
>> I need a javascript function written by myself in some widgets of a form.
>> I think the better solution is to put the function definition in one
>> file imported in the <head> portion of the form page so I can use the
>> function in every widget. But I don't known how can I do it, or an
>> alternative solution without change cform stylesheets (solution I don't
>> like).
>>
>> Thank's in advance
>>
>> Alberto Brosich
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Importing a javascript file in cform
Posted by Dev at weitling <de...@weitling.net>.
Hi Alberto,
I think it's tiem to ask the question: Should this javascript run
client- or server-side?
Bye,
Florian
Alberto Brosich wrote:
> I need a javascript function written by myself in some widgets of a form.
> I think the better solution is to put the function definition in one
> file imported in the <head> portion of the form page so I can use the
> function in every widget. But I don't known how can I do it, or an
> alternative solution without change cform stylesheets (solution I don't
> like).
>
> Thank's in advance
>
> Alberto Brosich
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Importing a javascript file in cform
Posted by Thomas Markus <t....@proventis.net>.
add your .js file to
<map:flow language="javascript">
<map:script src="file1.js"/>