Hello, I have the following code and I only want to display the "surroundingwestcomment" div if the select1 is checked with value of "Yes". So I need some javascript but I don't know what. Any ideas?
<xhtml:div>d. West - <xforms:select1 id="surroundingwest" ref="surrounding/west" appearance="full"> <xforms:choices><xforms:item><xforms:label>No exposures within 50'</xforms:label><xforms:value>No</xforms:value></xforms:item><xforms:item><xforms:label>Exposure within 50'</xforms:label><xforms:value>Yes</xforms:value></xforms:item></xforms:choices> </xforms:select1> <xhtml:br/> <xhtml:div id="surroundingwestcomment" style="display:none;"> Explain: <xhtml:br/> <xforms:textarea ref="surrounding/westexplain" incremental="true" mediatype="text/html"> <xforms:alert/> </xforms:textarea> </xhtml:div> </xhtml:div> |
How about:
<xforms:group ref="surrounding/west[. = 'Yes']"> <xhtml:div id="surroundingwestcomment"> Explain: <xhtml:br/> <xforms:textarea ref="surrounding/westexplain" incremental="true" mediatype="text/html"> <xforms:alert/> </xforms:textarea> </xhtml:div> </xforms:group> - Kalle On 26.11.2009, at 10.42, JohnBampton wrote: > > Hello, I have the following code and I only want to display the > "surroundingwestcomment" div if the select1 is checked with value of > "Yes". > So I need some javascript but I don't know what. Any ideas? > > <xhtml:div>d. West - <xforms:select1 id="surroundingwest" > ref="surrounding/west" appearance="full"> > > <xforms:choices><xforms:item><xforms:label>No > exposures within > 50'</xforms:label><xforms:value>No</xforms:value></ > xforms:item><xforms:item><xforms:label>Exposure > within > 50'</xforms:label><xforms:value>Yes</xforms:value></xforms:item></ > xforms:choices> > </xforms:select1> > <xhtml:br/> > > <xhtml:div id="surroundingwestcomment" > style="display:none;"> > Explain: <xhtml:br/> <xforms:textarea > ref="surrounding/westexplain" > incremental="true" mediatype="text/html"> > <xforms:alert/> > </xforms:textarea> > </xhtml:div> > </xhtml:div> > -- > View this message in context: http://n4.nabble.com/SELECT1-javascript-testing-for-checked-value-tp788098p788098.html > Sent from the ObjectWeb OPS - Users mailing list archive at > Nabble.com. > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi, it still doesn't show the textarea?? It only shows the word "Explain"
|
Sorry, the ref in textarea is now incorrect. Try this instead:
<xforms:group ref="surrounding[west = 'Yes']"> <xhtml:div id="surroundingwestcomment"> Explain: <xhtml:br/> <xforms:textarea ref="./westexplain" incremental="true" mediatype="text/html"> <xforms:alert/> </xforms:textarea> </xhtml:div> </xforms:group> - Kalle On 26.11.2009, at 10.58, JohnBampton wrote: > > Hi, it still doesn't show the textarea?? It only shows the word > "Explain" > > > > Kalle Säilä wrote: >> >> How about: >> >> <xforms:group ref="surrounding/west[. = 'Yes']"> >> <xhtml:div id="surroundingwestcomment"> >> Explain: <xhtml:br/> <xforms:textarea >> ref="surrounding/westexplain" >> incremental="true" mediatype="text/html"> >> <xforms:alert/> >> </xforms:textarea> >> </xhtml:div> >> </xforms:group> >> >> - Kalle >> >> On 26.11.2009, at 10.42, JohnBampton wrote: >> >>> >>> Hello, I have the following code and I only want to display the >>> "surroundingwestcomment" div if the select1 is checked with value of >>> "Yes". >>> So I need some javascript but I don't know what. Any ideas? >>> >>> <xhtml:div>d. West - <xforms:select1 id="surroundingwest" >>> ref="surrounding/west" appearance="full"> >>> >>> <xforms:choices><xforms:item><xforms:label>No >>> exposures within >>> 50'</xforms:label><xforms:value>No</xforms:value></ >>> xforms:item><xforms:item><xforms:label>Exposure >>> within >>> 50'</xforms:label><xforms:value>Yes</xforms:value></xforms:item></ >>> xforms:choices> >>> </xforms:select1> >>> <xhtml:br/> >>> >>> <xhtml:div id="surroundingwestcomment" >>> style="display:none;"> >>> Explain: <xhtml:br/> <xforms:textarea >>> ref="surrounding/westexplain" >>> incremental="true" mediatype="text/html"> >>> <xforms:alert/> >>> </xforms:textarea> >>> </xhtml:div> >>> </xhtml:div> >>> -- >>> View this message in context: >>> http://n4.nabble.com/SELECT1-javascript-testing-for-checked-value-tp788098p788098.html >>> Sent from the ObjectWeb OPS - Users mailing list archive at >>> Nabble.com. >>> >>> -- >>> You receive this message as a subscriber of the [hidden email] >>> mailing list. >>> To unsubscribe: mailto:[hidden email] >>> For general help: mailto:[hidden email]?subject=help >>> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> >> >> -- >> You receive this message as a subscriber of the [hidden email] >> mailing >> list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> > > -- > View this message in context: http://n4.nabble.com/SELECT1-javascript-testing-for-checked-value-tp788098p788108.html > Sent from the ObjectWeb OPS - Users mailing list archive at > Nabble.com. > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Yeah i figured that out, but it doesn't work if mediatype is set
That must be a bug. Any way around that with javascript?
|
You could try something like this:
<xhtml:div>d. West - <xforms:select1 id="surroundingwest" ref="surrounding/west" appearance="full"> <xforms:choices><xforms:item><xforms:label>No exposures within 50'</xforms:label><xforms:value>No</xforms:value></ xforms:item><xforms:item><xforms:label>Exposure within 50'</xforms:label><xforms:value>Yes</xforms:value></xforms:item></ xforms:choices> <xforms:action ev:event="xforms-value-changed"> <xxforms:script> var value = ORBEON.xforms.Document.getValue('surroundingwest'); var myDiv = document.getElementById('surroundingwestcomment'); if(value == 'Yes') { myDiv.style.display = 'block'; } else { myDiv.style.display = 'none'; } </xxforms:script> </xforms:action> </xforms:select1> <xhtml:br/> <xhtml:div id="surroundingwestcomment" style="display:none;"> Explain: <xhtml:br/> <xforms:textarea ref="surrounding/westexplain" incremental="true" mediatype="text/html"> <xforms:alert/> </xforms:textarea> </xhtml:div> </xhtml:div> Didn't tested that so it might not work at all. - Kalle On 26.11.2009, at 11.24, JohnBampton wrote: > > Yeah i figured that out, but it doesn't work if mediatype is set > > That must be a bug. > > Any way around that with javascript? > > > Kalle Säilä wrote: >> >> Sorry, the ref in textarea is now incorrect. Try this instead: >> >> <xforms:group ref="surrounding[west = 'Yes']"> >> <xhtml:div id="surroundingwestcomment"> >> Explain: <xhtml:br/> <xforms:textarea >> ref="./westexplain" >> incremental="true" mediatype="text/html"> >> <xforms:alert/> >> </xforms:textarea> >> </xhtml:div> >> </xforms:group> >> >> - Kalle >> >> On 26.11.2009, at 10.58, JohnBampton wrote: >> >>> >>> Hi, it still doesn't show the textarea?? It only shows the word >>> "Explain" >>> >>> >>> >>> Kalle Säilä wrote: >>>> >>>> How about: >>>> >>>> <xforms:group ref="surrounding/west[. = 'Yes']"> >>>> <xhtml:div id="surroundingwestcomment"> >>>> Explain: <xhtml:br/> <xforms:textarea >>>> ref="surrounding/westexplain" >>>> incremental="true" mediatype="text/html"> >>>> <xforms:alert/> >>>> </xforms:textarea> >>>> </xhtml:div> >>>> </xforms:group> >>>> >>>> - Kalle >>>> >>>> On 26.11.2009, at 10.42, JohnBampton wrote: >>>> >>>>> >>>>> Hello, I have the following code and I only want to display the >>>>> "surroundingwestcomment" div if the select1 is checked with >>>>> value of >>>>> "Yes". >>>>> So I need some javascript but I don't know what. Any ideas? >>>>> >>>>> <xhtml:div>d. West - <xforms:select1 id="surroundingwest" >>>>> ref="surrounding/west" appearance="full"> >>>>> >>>>> <xforms:choices><xforms:item><xforms:label>No >>>>> exposures within >>>>> 50'</xforms:label><xforms:value>No</xforms:value></ >>>>> xforms:item><xforms:item><xforms:label>Exposure >>>>> within >>>>> 50'</xforms:label><xforms:value>Yes</xforms:value></xforms:item></ >>>>> xforms:choices> >>>>> </xforms:select1> >>>>> <xhtml:br/> >>>>> >>>>> <xhtml:div id="surroundingwestcomment" >>>>> style="display:none;"> >>>>> Explain: <xhtml:br/> <xforms:textarea >>>>> ref="surrounding/westexplain" >>>>> incremental="true" mediatype="text/html"> >>>>> <xforms:alert/> >>>>> </xforms:textarea> >>>>> </xhtml:div> >>>>> </xhtml:div> >>>>> -- >>>>> View this message in context: >>>>> http://n4.nabble.com/SELECT1-javascript-testing-for-checked-value-tp788098p788098.html >>>>> Sent from the ObjectWeb OPS - Users mailing list archive at >>>>> Nabble.com. >>>>> >>>>> -- >>>>> You receive this message as a subscriber of the [hidden email] >>>>> mailing list. >>>>> To unsubscribe: mailto:[hidden email] >>>>> For general help: mailto:[hidden email]?subject=help >>>>> OW2 mailing lists service home page: http://www.ow2.org/wws >>>> >>>> >>>> >>>> -- >>>> You receive this message as a subscriber of the [hidden email] >>>> mailing >>>> list. >>>> To unsubscribe: mailto:[hidden email] >>>> For general help: mailto:[hidden email]?subject=help >>>> OW2 mailing lists service home page: http://www.ow2.org/wws >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://n4.nabble.com/SELECT1-javascript-testing-for-checked-value-tp788098p788108.html >>> Sent from the ObjectWeb OPS - Users mailing list archive at >>> Nabble.com. >>> >>> -- >>> You receive this message as a subscriber of the [hidden email] >>> mailing list. >>> To unsubscribe: mailto:[hidden email] >>> For general help: mailto:[hidden email]?subject=help >>> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> >> >> -- >> You receive this message as a subscriber of the [hidden email] >> mailing >> list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> > > -- > View this message in context: http://n4.nabble.com/SELECT1-javascript-testing-for-checked-value-tp788098p788120.html > Sent from the ObjectWeb OPS - Users mailing list archive at > Nabble.com. > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
NO that doesn't work? Any other ideas?
|
It seems that with Orebon javaScript functions you must reference to
xforms:input instead of xforms:select1. I tested this and it worked: <xhtml:div> <xforms:input id="hidden-input" ref="surrounding/west" style="display: none;" /> d. West - <xforms:select1 id="surroundingwest" ref="surrounding/west" appearance="full"> <xforms:choices><xforms:item><xforms:label>No exposures within 50'</xforms:label><xforms:value>No</xforms:value></ xforms:item><xforms:item><xforms:label>Exposure within 50'</xforms:label><xforms:value>Yes</xforms:value></xforms:item></ xforms:choices> <xforms:action ev:event="xforms-value-changed"> <xxforms:script> var value = ORBEON.xforms.Document.getValue('hidden-input'); var myDiv = document.getElementById('surroundingwestcomment'); if(value == 'Yes') { myDiv.style.display = 'block'; } else { myDiv.style.display = 'none'; } </xxforms:script> </xforms:action> </xforms:select1> <xhtml:br/> <xhtml:div id="surroundingwestcomment" style="display:none;"> Explain: <xhtml:br/> <xforms:textarea ref="surrounding/westexplain" incremental="true" mediatype="text/html"> <xforms:alert/> </xforms:textarea> </xhtml:div> </xhtml:div> - Kalle On 26.11.2009, at 11.58, JohnBampton wrote: > > NO that doesn't work? Any other ideas? > > > > Kalle Säilä wrote: >> >> You could try something like this: >> >> <xhtml:div>d. West - <xforms:select1 id="surroundingwest" >> ref="surrounding/west" appearance="full"> >> >> <xforms:choices><xforms:item><xforms:label>No >> exposures within >> 50'</xforms:label><xforms:value>No</xforms:value></ >> xforms:item><xforms:item><xforms:label>Exposure >> within >> 50'</xforms:label><xforms:value>Yes</xforms:value></xforms:item></ >> xforms:choices> >> <xforms:action ev:event="xforms-value-changed"> >> <xxforms:script> >> var value = ORBEON.xforms.Document.getValue('surroundingwest'); >> var myDiv = document.getElementById('surroundingwestcomment'); >> if(value == 'Yes') { >> myDiv.style.display = 'block'; >> } else { >> myDiv.style.display = 'none'; >> } >> </xxforms:script> >> </xforms:action> >> </xforms:select1> >> <xhtml:br/> >> >> <xhtml:div id="surroundingwestcomment" >> style="display:none;"> >> Explain: <xhtml:br/> <xforms:textarea >> ref="surrounding/westexplain" >> incremental="true" mediatype="text/html"> >> <xforms:alert/> >> </xforms:textarea> >> </xhtml:div> >> </xhtml:div> >> >> Didn't tested that so it might not work at all. >> >> - Kalle >> >> On 26.11.2009, at 11.24, JohnBampton wrote: >> >>> >>> Yeah i figured that out, but it doesn't work if mediatype is set >>> >>> That must be a bug. >>> >>> Any way around that with javascript? >>> >>> >>> Kalle Säilä wrote: >>>> >>>> Sorry, the ref in textarea is now incorrect. Try this instead: >>>> >>>> <xforms:group ref="surrounding[west = 'Yes']"> >>>> <xhtml:div id="surroundingwestcomment"> >>>> Explain: <xhtml:br/> <xforms:textarea >>>> ref="./westexplain" >>>> incremental="true" mediatype="text/html"> >>>> <xforms:alert/> >>>> </xforms:textarea> >>>> </xhtml:div> >>>> </xforms:group> >>>> >>>> - Kalle >>>> >>>> On 26.11.2009, at 10.58, JohnBampton wrote: >>>> >>>>> >>>>> Hi, it still doesn't show the textarea?? It only shows the word >>>>> "Explain" >>>>> >>>>> >>>>> >>>>> Kalle Säilä wrote: >>>>>> >>>>>> How about: >>>>>> >>>>>> <xforms:group ref="surrounding/west[. = 'Yes']"> >>>>>> <xhtml:div id="surroundingwestcomment"> >>>>>> Explain: <xhtml:br/> <xforms:textarea >>>>>> ref="surrounding/westexplain" >>>>>> incremental="true" mediatype="text/html"> >>>>>> <xforms:alert/> >>>>>> </xforms:textarea> >>>>>> </xhtml:div> >>>>>> </xforms:group> >>>>>> >>>>>> - Kalle >>>>>> >>>>>> On 26.11.2009, at 10.42, JohnBampton wrote: >>>>>> >>>>>>> >>>>>>> Hello, I have the following code and I only want to display the >>>>>>> "surroundingwestcomment" div if the select1 is checked with >>>>>>> value of >>>>>>> "Yes". >>>>>>> So I need some javascript but I don't know what. Any ideas? >>>>>>> >>>>>>> <xhtml:div>d. West - <xforms:select1 id="surroundingwest" >>>>>>> ref="surrounding/west" appearance="full"> >>>>>>> >>>>>>> <xforms:choices><xforms:item><xforms:label>No >>>>>>> exposures within >>>>>>> 50'</xforms:label><xforms:value>No</xforms:value></ >>>>>>> xforms:item><xforms:item><xforms:label>Exposure >>>>>>> within >>>>>>> 50'</xforms:label><xforms:value>Yes</xforms:value></ >>>>>>> xforms:item></ >>>>>>> xforms:choices> >>>>>>> </xforms:select1> >>>>>>> <xhtml:br/> >>>>>>> >>>>>>> <xhtml:div id="surroundingwestcomment" >>>>>>> style="display:none;"> >>>>>>> Explain: <xhtml:br/> <xforms:textarea >>>>>>> ref="surrounding/westexplain" >>>>>>> incremental="true" mediatype="text/html"> >>>>>>> <xforms:alert/> >>>>>>> </xforms:textarea> >>>>>>> </xhtml:div> >>>>>>> </xhtml:div> >>>>>>> -- >>>>>>> View this message in context: >>>>>>> http://n4.nabble.com/SELECT1-javascript-testing-for-checked-value-tp788098p788098.html >>>>>>> Sent from the ObjectWeb OPS - Users mailing list archive at >>>>>>> Nabble.com. >>>>>>> >>>>>>> -- >>>>>>> You receive this message as a subscriber of the ops- >>>>>>> [hidden email] >>>>>>> mailing list. >>>>>>> To unsubscribe: mailto:[hidden email] >>>>>>> For general help: mailto:[hidden email]?subject=help >>>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> You receive this message as a subscriber of the [hidden email] >>>>>> mailing >>>>>> list. >>>>>> To unsubscribe: mailto:[hidden email] >>>>>> For general help: mailto:[hidden email]?subject=help >>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws >>>>>> >>>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://n4.nabble.com/SELECT1-javascript-testing-for-checked-value-tp788098p788108.html >>>>> Sent from the ObjectWeb OPS - Users mailing list archive at >>>>> Nabble.com. >>>>> >>>>> -- >>>>> You receive this message as a subscriber of the [hidden email] >>>>> mailing list. >>>>> To unsubscribe: mailto:[hidden email] >>>>> For general help: mailto:[hidden email]?subject=help >>>>> OW2 mailing lists service home page: http://www.ow2.org/wws >>>> >>>> >>>> >>>> -- >>>> You receive this message as a subscriber of the [hidden email] >>>> mailing >>>> list. >>>> To unsubscribe: mailto:[hidden email] >>>> For general help: mailto:[hidden email]?subject=help >>>> OW2 mailing lists service home page: http://www.ow2.org/wws >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://n4.nabble.com/SELECT1-javascript-testing-for-checked-value-tp788098p788120.html >>> Sent from the ObjectWeb OPS - Users mailing list archive at >>> Nabble.com. >>> >>> -- >>> You receive this message as a subscriber of the [hidden email] >>> mailing list. >>> To unsubscribe: mailto:[hidden email] >>> For general help: mailto:[hidden email]?subject=help >>> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> >> >> -- >> You receive this message as a subscriber of the [hidden email] >> mailing >> list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> > > -- > View this message in context: http://n4.nabble.com/SELECT1-javascript-testing-for-checked-value-tp788098p788142.html > Sent from the ObjectWeb OPS - Users mailing list archive at > Nabble.com. > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
You guru, thanks a lot - my boss will be happy now
|
In reply to this post by Kalle Säilä
Hi All, I would like to upgrade our application to 3.7.1, but I always get this error message: Cannot find processor factory with name "{http://www.orbeon.com/oxf/processors}xforms-input" even if I make a very simple test page like this: <page path-info="/testexpression" view="/organizer/test/test.xsl"/> I have checked the processor.xml in the otbeon.jar, and there is no xforms-input processor registered in this version. I don't know what should I do? Can anybody help me? Thank you: Laszlo -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Laszlo.
How did you proceed to upgrade? Did you copy your app to the new Orbeon Forms WAR? The above hints that maybe you have a RESOURCES/config directory with old files, such as an old epilogue. -Erik On Thu, Nov 26, 2009 at 7:56 AM, <[hidden email]> wrote: > > Hi All, > > I would like to upgrade our application to 3.7.1, but I always get this > error message: > > Cannot find processor factory with name > "{http://www.orbeon.com/oxf/processors}xforms-input" > > even if I make a very simple test page like this: > <page path-info="/testexpression" view="/organizer/test/test.xsl"/> > > > I have checked the processor.xml in the otbeon.jar, and there is no > xforms-input processor registered in this version. > I don't know what should I do? > > Can anybody help me? > > Thank you: > Laszlo > > > -- > You receive this message as a subscriber of the [hidden email] mailing > list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |