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
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext 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

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
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.