473,387 Members | 3,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

xforms select trouble

I don't have any problems with select1 or textarea with my xforms in firefox 1.5.0.9, but I can't seem to get my "select" several choices to work.
I need to select zero or more of several choices. (more than one choice allowed to be checked)

here's my instance.xml:

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" ?>
  2. <test>
  3. <ii id="1">
  4.  <qu id="0">
  5.    <ans id="1" type="radio"></ans>
  6.    <ans id="2" type="radio"></ans>
  7.    <ans id="3" type="radio"></ans>
  8.  </qu>
  9. </ii>
  10. </test>
Here's my xhtml/xforms file below. I first tried placing
Expand|Select|Wrap|Line Numbers
  1. ref="//ans[@id='1']    <!--and @id='2', '3' respectively-->
in each of the corresponding <value> elements. Then I tried placing just ...@id='1' in the <select> element just to see if I might get a string back. But I'm getting nothing. I tried wrapping each element separately into it's own select element but even that didn't work. Any ideas?

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" ?>
  2.       <h:html
  3.       xmlns:h="http://www.w3.org/1999/xhtml"
  4.       xmlns:ev="http://www.w3.org/2001/xml-events"
  5.       xmlns:xf="http://www.w3.org/2002/xforms">
  6.  
  7. <h:head>
  8.  <h:title>XHTML/XForms</h:title>
  9.  
  10. <xf:model>
  11.     <xf:instance src="xfinstance.xml"/>
  12.      <xf:submission id="xfanswers"                
  13.       action="http://localhost/PHPstuff/xfanswers.php"
  14.        method="post"/>
  15.  
  16.  </xf:model>
  17. </h:head>
  18.  
  19. <h:body>
  20.  
  21. <xf:label> Several answers may be correct </xf:label>
  22.  
  23. <xf:select  appearance="full">
  24.     <xf:label> How well does Mary sing?  </xf:label>
  25.  <xf:item>
  26.    <xf:label> Well. </xf:label>
  27.    <xf:value > Well. </xf:value>
  28.  </xf:item>
  29.  
  30. <xf:item>
  31.    <xf:label> well enough. </xf:label>
  32.    <xf:value > well enough. </xf:value>
  33.  </xf:item>
  34.  
  35.   <xf:item>
  36.    <xf:label>better than most </xf:label>
  37.    <xf:value> better than most </xf:value>
  38.  </xf:item>
  39.  
  40. </xf:select>
  41. <xf:submit submission="xfanswers">
  42.    <xf:label>Submit</xf:label>
  43. </xf:submit>
  44.  
  45. </h:body>
  46. </h:html>
  47.  
  48.  
Jan 30 '07 #1
0 1119

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jonathan | last post by:
Does anyone know if it's possible to do the following: I currently have an XML schema set up, part of which includes an enumerated datatype (based on string) giving a list of values that I want...
5
by: Jonathan | last post by:
Does anyone know if it's possible to force a 'select' element (or select1) to bind each selected value to a seperate element when written to a file, instead of just putting all the values in one...
2
by: Will | last post by:
I have been having problems validating an XForms document against the XForms schema located at http://www.w3.org/MarkUp/Forms/2002/XForms-Schema.xsd. I have reduced the XForm to its bare bones...
0
by: arti | last post by:
Hi all. I have a problem/question with XForms. I have 2 instnace in my document, instance1 and instance2. <xforms:instance xmlns="" id=instance1"> .... </xforms:instance> <xforms:instance...
9
by: jazzslider | last post by:
I have a headache. I've done a LOT of research lately into XForms, and I am thoroughly convinced that a good implementation of this technology would help me immensely in converting my...
7
by: ClarkePeters | last post by:
Can anyone tell me why my CSS style sheet isn't styling my xhtml (using xforms)? I'm using firefox 1.5.0.8 with the xforms extension. Here is the xhtml, it's only a single text area for input. ...
1
by: spark86 | last post by:
I currently have an xform where I'm trying to have the user input first and last name and then when it submits it goes to a file with the path first_last.xml. Here is what I have currently: ...
2
by: li72 | last post by:
Hi. I’m new to XForms society and struggling with a basic concepts. However, I’m trying to transform an xml doc into XForms using XSLT. The browser renders the Xforms just fine but there is no...
0
by: li72 | last post by:
As you can see in binding part, the node<age /> should be returned as a calendar or any form of date picker instead of an input box. In addition, none null values submission is not achieving. I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.