开发者

How to create a dropdown form using jquery and stripes?

I've recently got to know the Stripes framework and is implementing it in one of my project. I'm trying to create a dynamic form consisting of radio-buttoned questions. I've used the functions to code.

I've tried to use jQuery but it seems to give me errors.

For example, the user selected this:

`<stripes:radio name="place" value="a"/>a
 <stripes:radio name="place" value="b"/>b
 <stripes:radio name="place" value="c"/>c

After clicking on the option, it will show the next question, similar to the abovementioned. However, when I implement function () {$(stripes:radio).show()} to link to the next question, it doesn't show.

Am I going on the right track or is there any better ways to solve this?

I apologize if I'm not clear enough. I'm still new to this and please guide me along. thank开发者_运维问答 you!


The 'show()' method is only available on a JQuery object, thus you should use a JQuery selector to get such an object (has nothing to do with Stripes, as Stripes is server side and JQuery runs in the browser!). For example:

function() {  $('#radiobuttons').show) }

This will make this block of HTML visible:

<div id="radiobuttons">
  <stripes:radio name="place" value="a"/>a    
  <stripes:radio name="place" value="b"/>b    
  <stripes:radio name="place" value="c"/>c
</div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜