Problems processing javascript in nightly build

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

Problems processing javascript in nightly build

Chris Bailey-2
Hi Guys,

In an attempt to get Orbeon working for FF3 I downloaded the latest
nightly build (3.6.0.200806250537)

I've found it has problems processing my own javascript.

Specifically, if my html contains this:

<xhtml:input onkeydown="if (true == true) { myFun('foo'); }"/>

I get:

XPath syntax error at char 32 on line -1 in {...rue == true) {
myFun('foo')...}:
Unknown system function myFun()

If i replace the line above with
<xhtml:input onkeydown="myFun('bar');"/>
It works fine.

Attached is a simple test that fails in the sandbox.

Chris


--
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

test_javascript.xhtml (728 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problems processing javascript in nightly build

Erik Bruchez
Administrator
Chris,

That's because AVTs on XHTML attributes are being interpreted. This  
causes the "{" and "}" to be handled by the XForms engine.

You can either:

1. Turn off host languages AVTs in properties.xml
2. Escape the brackets with "{{" and "}}"

-Erik

On Jun 26, 2008, at 3:27 AM, Chris Bailey wrote:

> Hi Guys,
>
> In an attempt to get Orbeon working for FF3 I downloaded the latest  
> nightly build (3.6.0.200806250537)
>
> I've found it has problems processing my own javascript.
>
> Specifically, if my html contains this:
>
> <xhtml:input onkeydown="if (true == true) { myFun('foo'); }"/>
>
> I get:
>
> XPath syntax error at char 32 on line -1 in {...rue == true)  
> { myFun('foo')...}:
> Unknown system function myFun()
>
> If i replace the line above with
> <xhtml:input onkeydown="myFun('bar');"/>
> It works fine.
>
> Attached is a simple test that fails in the sandbox.
>
> Chris
> <test_javascript.xhtml>
> --
> 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 for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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