XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + Use of before and after string (3) Sticky Topic
-> - How do I substitute element ty... (1)
-> + How does one add working days ... (4)
-> - Help, I have existing XLT and... (1)
-> + Need help on XSLT issue - (2)
-> + EDI to XML Conversion (7)
-> - XML To JSON Conversion using X... (1)
-> + Formatting Paragraphs to same ... (2)
-> - Grouping of records (1)
-> + Problems with xsd 1.1 (4)
-> + XML to HL7 mapping (3)
-> + XSLT 3 and Iterate (2)
-> + XSL-FO to PDF preview (3)
-> + java.lang.RuntimeException: Er... (2)
-> + Create Acroforms with Stylus X... (2)
-> + How to change XSLT parameter s... (3)
-> + how to change format of the da... (2)
-> + Search "Next 8 Results " doesn... (2)
-> - Support for Git (1)
-> + newbee (8)
-- [1-20] [21-40] [41-60] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
John SmithSubject: Need help determinig if any radio buttons are selected.
Author: John Smith
Date: 21 Mar 2006 04:16 PM
I am working with XSL for the first time and I'm using it in conjunction with Filemaker server 8 pro. I have the following code which makes 5 radio buttons (from filemakers 'New Value List') for the particular survey question, I am trying to determine if any of them are selected when the user clicks the submit button, if not I want to present them with a message box to inform them not all questions have been answered. Thank you very much for your assistance!



<tr>
<td align="right" width="25%">
<b>Rate the response time for your service call/request: </b>
</td>

<td align="center">
<xsl:variable name="field-value" select="fmrs:resultset/fmrs:record/fmrs:field[@name='Response02']/fmrs:data"/>
<xsl:choose>
<xsl:when test="$_found-count>0 and string-length($field-value)>0">
<xsl:for-each select="$field-value">
<xsl:if test="position() != 1"><br/></xsl:if>
<xsl:variable name="repeat-count" select="position()"/>
<xsl:for-each select="$valuelists[@NAME = 'New Value List']/fml:VALUE">
<input type="radio">
<xsl:attribute name="name">Response02(<xsl:value-of select="$repeat-count"/>)</xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute>
</input> &#160; &#160; &#160; &#160;
</xsl:for-each>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="$valuelists[@NAME = 'New Value List']/fml:VALUE">
<input type="radio">
<xsl:attribute name="name">Response02</xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute>
</input> &#160; &#160; &#160; &#160;
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>


this is what my submit button code looks like...


<input name="-new" type="submit" onclick_="javascript:window.close()">
<xsl:attribute name="value">Submit Survey</xsl:attribute>
<xsl:attribute name="caption">Click here to submit survey</xsl:attribute>
</input>

Postnext
Minollo I.Subject: Need help determinig if any radio buttons are selected.
Author: Minollo I.
Date: 21 Mar 2006 04:39 PM
Looks like you are in good shape with your XSLT; is your question really about how to do that in HTML? That's beyond the scope of this forum.

Minollo

Posttop
John SmithSubject: Need help determinig if any radio buttons are selected.
Author: John Smith
Date: 22 Mar 2006 08:34 AM
To be honest I’m not sure how to do it, I did want to see if I could do it using the xls, but the answer has eluded me. I have tried a couple of different methods but nothing seems to work correctly. Any hints or advice to guide me in the right direction or a flat out answer in code would be greatly appreciated!

Thanks,
Jon

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.