The isRelativePath() function mentioned below shouldn't just single out
javascript: but rather should follow the URI spec and say that anything
with a proper URI scheme (selected chars ending in colon) should be
classified as absolute.
A test form should still be made that uses the change to invoke a piece of
trivial javascript from xf:load.
Original message from Fiodar Zboichyk:
following is the scenario where an <xforms:trigger> control calls a
javascript function and passes some context information.
excerpt from the form:
===
<xforms:repeat id="rep_entry" bind="bind_entries">
...
<xforms:trigger>
<xforms:label>calc</xforms:label>
<xforms:load ev:event="DOMActivate">
<xforms:resource
value="concat('javascript:showDosageDialog(',index('rep-entry'),')')"></xforms:r
esource>
</xforms:load>
</xforms:trigger>
</xforms:repeat>
===
the function is "showDosageDialog( index )", which then uses index to get
the right data from the model and do something. It sets the data back into
the model using model.setValue method. The function itself does not return
anything.
In order for this to work, "isRelativePath" function needs to be updated in
ubiquity xforms, file "lib/_backplane/xlink.js"
Original issue reported on code.google.com by erik...@gmail.com on 14 Oct 2009 at 3:34
Original issue reported on code.google.com by
erik...@gmail.com
on 14 Oct 2009 at 3:34