Results 1 to 8 of 8
  1. #1
    n09
    n09 is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default Radio button on click function

    Hi ,

    facing problem in coding . I have to implement radio button onclick event . click to "Yes" radio button will open other two radio button and clicking to "NO" give 5 text boxes .

    Please give me struts action class .

    jsp is below

    <form name="AddressUpdate" method="post"
    action="/Home.do">
    <jsp:include page="/appln/includes/common/_formErrors.jsp" flush="true" />
    Do you engage in the private practice of New Jersey law at all in any Juridisdiction
    <p>
    <input type="radio" name="Yes" value=r1
    onclick="retrieveURL('showRadio.do?selectPractice= ' + this.value);">

    &nbsp;Yes
    <input type="radio" name="No" value=r1
    onclick="retrieveURL('showRadio.do?selectPractice= ' + this.value);">
    &nbsp;No

    </FORM>

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: Radio button on click function

    Struts has a radio tag.
    It's all in the documentation.
    I know it's not the greatest in the world, but the tag references are pretty reasonable.

  3. #3
    n09
    n09 is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default Re: Radio button on click function

    Hello,

    sorry , forgot to mention using struts and JSTL library can anyone give me sample of code .

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: Radio button on click function

    Here's the tag reference...since you don't seem to want to look it up yourself.

  5. #5
    n09
    n09 is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default Re: Radio button on click function

    ok Sir one more question ,I know what I need to write in Action class but can you help me for this what would be the Form bean,As In put screen is only having radio button .


    <action path="/Name" type="ActionClass" name="FormBeanClass" input="/index.jsp">
    <forward name="success" path="/displayradio.jsp"/>
    </action>

  6. #6
    n09
    n09 is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default Re: Radio button on click function

    ok got it .

  7. #7
    n09
    n09 is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default Re: Radio button on click function

    I am getting below error can anyone tell me the solution

    Error Message: bean A*** not found within scope
    Error Code: 500
    Target Servlet: /appln/policy/bono.jsp
    Error Stack:
    java.lang.InstantiationException: bean A**** not found within scope
    at com.ibm._jsp._bono._jspService(_AddrBonoEntry.java :125)

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: Radio button on click function

    You are trying to use a bean in bono.jsp that isn't within scope.

    Without seeing code can't say more than that, even then it's possible the error lies elsewhere.
    Track where bean A*** is created and stored.

Similar Threads

  1. validurl function not working when I click the submit button
    By kritijain in forum JavaServer Pages (JSP) and JSTL
    Replies: 7
    Last Post: 06-10-2011, 11:22 AM
  2. Radio Button
    By S-NESH in forum New To Java
    Replies: 6
    Last Post: 02-04-2011, 05:03 PM
  3. Radio Button help!
    By javanator in forum New To Java
    Replies: 3
    Last Post: 04-25-2010, 08:01 PM
  4. Double click radio button
    By mandragora in forum AWT / Swing
    Replies: 11
    Last Post: 11-10-2008, 11:06 AM
  5. How to use SWT Radio Button
    By Java Tip in forum SWT Tips
    Replies: 0
    Last Post: 07-25-2008, 02:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •