Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » v 1.35 - JavaScript functionality
v 1.35 - JavaScript functionality [message #1328] Thu, 01 May 2008 14:30 Go to next message
ljkbrost is currently offline  ljkbrost
Messages: 59
Registered: April 2006
Member
Hi,

I'm not sure if this is a feature request or a bug. When using the javascript functionality, I'm trying to setup a field with an 'id' attribute.

Looking at the code this is only possible with the 'href_id' within the fieldspec's javascript definition. Unfortunately this only works with image/label controls.

I think the XSL template 'scripting_events' should also have the id attribute added to the list. This will give the ability to specify a unique id that can be used by the javascript DOM instead of having to iterate over very input field type to find the corresponding value.

So:
<xsl:template name="scripting_events">
  <xsl:param name="item"/>
  <!-- copy all attributes containing scripting events to the output document -->
  <xsl:for-each select="$item/@onfocus|$item/@onblur|$item/@onselect|$item/@onchange
                       |$item/@onclick|$item/@ondblclick|$item/@onmousedown|$item/@onmouseup
                       |$item/@onmouseover|$item/@onmusemove|$item/@onmouseout
                       |$item/@onkeypress|$item/@onkydown|$item/@onkeyup
                       |$item/@show">
    <xsl:copy-of select="." />
  </xsl:for-each>
</xsl:template>


Would become:

<xsl:template name="scripting_events">
  <xsl:param name="item"/>

  <!-- copy all attributes containing scripting events to the output document -->
  <xsl:for-each select="$item/@onfocus|$item/@onblur|$item/@onselect|$item/@onchange
                       |$item/@onclick|$item/@ondblclick|$item/@onmousedown|$item/@onmouseup
                       |$item/@onmouseover|$item/@onmusemove|$item/@onmouseout
                       |$item/@onkeypress|$item/@onkydown|$item/@onkeyup|$item/@id
                       |$item/@show">
    <xsl:copy-of select="." />
  </xsl:for-each>

</xsl:template>


Cheers,


Kyle Brost
----
Re: v 1.35 - JavaScript functionality [message #1329 is a reply to message #1328] Thu, 01 May 2008 19:04 Go to previous message
AJM is currently offline  AJM
Messages: 2348
Registered: April 2006
Location: Surrey, UK
Senior Member
That sounds simple enough. I'll include it in the next release.

Previous Topic: v 1.35 - Relationship Calculated Field Escaping
Next Topic: v 1.35 - Screen File Layout
Goto Forum:
  


Current Time: Sat May 04 02:53:44 EDT 2024

Total time taken to generate the page: 0.01050 seconds