Running Javascript on xforms-ready event

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Running Javascript on xforms-ready event

Louis Ratzesberger

 Hi,

I am attempting to run some Javascript once when the form is ready:

<xforms:action ev:event="xforms-ready">
<xforms:setvalue ref="instance('pack')/pack/sta" value="'gvda'"/>
<xxforms:script>
openStaMarker();
setLayouts();
</xxforms:script>
</xforms:action>

The setvalue element is effective, but the JavaScript does not run.

This version is more than a month old now.

Thanks for any ideas .

--Hank

(Also called Louis, legally.)

--
Hank Ratzesberger
[hidden email]



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Running Javascript on xforms-ready event

Alessandro  Vernet
Administrator
Hank,

I am putting this in a test page, and it works fine here. Are you sure
the JavaScript is not called? What is replace it with alert("yea!")?

Alex

On Wed, Mar 24, 2010 at 3:24 PM, Louis Ratzesberger
<[hidden email]> wrote:

>  Hi,
>
> I am attempting to run some Javascript once when the form is ready:
>
> <xforms:action ev:event="xforms-ready">
> <xforms:setvalue ref="instance('pack')/pack/sta" value="'gvda'"/>
> <xxforms:script>
> openStaMarker();
> setLayouts();
> </xxforms:script>
> </xforms:action>
>
> The setvalue element is effective, but the JavaScript does not run.
>
> This version is more than a month old now.
>
> Thanks for any ideas .
>
> --Hank
>
> (Also called Louis, legally.)
>
> --
> Hank Ratzesberger
> [hidden email]
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Running Javascript on xforms-ready event

Louis Ratzesberger

Hi Alex,

Aha, I was attempting to call a Google map api, but the
map had not been created yet.  I have my own onload function in my
body element.  I put my code in there and it works.  My onload apparently
runs after all orbeon/xforms startup -- as I would expect.

Reminds me of the old multiple inheritance object initialization puzzle.

So "I'm good", thanks,
Hank



Quoting Alessandro Vernet <[hidden email]>:

> Hank,
>
> I am putting this in a test page, and it works fine here. Are you sure
> the JavaScript is not called? What is replace it with alert("yea!")?
>
> Alex
>
> On Wed, Mar 24, 2010 at 3:24 PM, Louis Ratzesberger
> <[hidden email]> wrote:
>>  Hi,
>>
>> I am attempting to run some Javascript once when the form is ready:
>>
>> <xforms:action ev:event="xforms-ready">
>> <xforms:setvalue ref="instance('pack')/pack/sta" value="'gvda'"/>
>> <xxforms:script>
>> openStaMarker();
>> setLayouts();
>> </xxforms:script>
>> </xforms:action>
>>
>> The setvalue element is effective, but the JavaScript does not run.
>>
>> This version is more than a month old now.
>>
>> Thanks for any ideas .
>>
>> --Hank
>>
>> (Also called Louis, legally.)
>>
>> --
>> Hank Ratzesberger
>> [hidden email]
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing
>> list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
>
>
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise -
> http://www.orbeon.com/
> My Twitter: http://twitter.com/avernet
>

 

--
Hank Ratzesberger
[hidden email]



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Running Javascript on xforms-ready event

Alessandro  Vernet
Administrator
Hank,

Alright; let us know if you have this problem again, 'cause it should
work ;). Have you seen the XBL components we have for Google Maps? Is
there something you wanted to do you can't do with that component?

http://wiki.orbeon.com/forms/doc/developer-guide/xbl-components/map

Alex

On Fri, Mar 26, 2010 at 3:36 PM, Louis Ratzesberger
<[hidden email]> wrote:

> Hi Alex,
>
> Aha, I was attempting to call a Google map api, but the
> map had not been created yet.  I have my own onload function in my
> body element.  I put my code in there and it works.  My onload apparently
> runs after all orbeon/xforms startup -- as I would expect.
>
> Reminds me of the old multiple inheritance object initialization puzzle.
>
> So "I'm good", thanks,
> Hank
>
>
>
> Quoting Alessandro Vernet <[hidden email]>:
>
>> Hank,
>>
>> I am putting this in a test page, and it works fine here. Are you sure
>> the JavaScript is not called? What is replace it with alert("yea!")?
>>
>> Alex
>>
>> On Wed, Mar 24, 2010 at 3:24 PM, Louis Ratzesberger
>> <[hidden email]> wrote:
>>>  Hi,
>>>
>>> I am attempting to run some Javascript once when the form is ready:
>>>
>>> <xforms:action ev:event="xforms-ready">
>>> <xforms:setvalue ref="instance('pack')/pack/sta" value="'gvda'"/>
>>> <xxforms:script>
>>> openStaMarker();
>>> setLayouts();
>>> </xxforms:script>
>>> </xforms:action>
>>>
>>> The setvalue element is effective, but the JavaScript does not run.
>>>
>>> This version is more than a month old now.
>>>
>>> Thanks for any ideas .
>>>
>>> --Hank
>>>
>>> (Also called Louis, legally.)
>>>
>>> --
>>> Hank Ratzesberger
>>> [hidden email]
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email] mailing
>>> list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>>
>>
>>
>>
>> --
>> Orbeon Forms - Web forms, open-source, for the Enterprise -
>> http://www.orbeon.com/
>> My Twitter: http://twitter.com/avernet
>>
>
>
>
> --
> Hank Ratzesberger
> [hidden email]
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet