Why not generate your JavaScript in a seperate XQuery and link them into the xhtml page? That way you can generate the appropraite media-type's for each. We do a similar thing for our application.

BTW - this media-type=text/html method=xhtml is not the correct mimetype for JavaScript.

-----Original Message-----
From: exist-open-bounces@lists.sourceforge.net on behalf of Matthew Graham
Sent: Sat 30/09/2006 07:25
To: exist-open@lists.sourceforge.net
Subject: [Exist-open] xql, Javascript and XForms

Hi,

I'm trying to write an xql file containing JavaScript and XForms to use
with Firefox and its XForms plug-in. To get the XForms to work, I have
to preface the file with:

declare option exist:serialize "media-type=application/xhtml+xml";

However, to get JavaScript working, I have to use:

declare option exist:serialize "media-type=text/html method=xhtml";

If I try combining these then the XForms do not render: how can I do
this and what is the difference between media-type and method?

    Cheers,

    Matthew

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Exist-open mailing list
Exist-open@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open