8 Replies Latest reply on Sep 25, 2008 6:09 AM by kirsten10

    Radio Buttons in HTMLHelp

      I am currently working on a project wherein I need to use radio button. However, I am experiencing a page cannot be displayed issue once I compile the project, launch the chm file, select a radio button and click on the submit button. Compiling the project on WebHelp does not give the same result. The radio button works perfectly fine. Is this a product limitation with RoboHelp for HTML? I really need to use this button. Can somebody please help me? Is there any tweak that I need to do in order to make the radio button work on a chm file? Thanks in advance.
        • 1. Re: Radio Buttons in HTMLHelp
          RoboColum(n) Level 5
          Hi kirsten10 and welcome to the RH community.
          Can you tell us what the Submit button is doing in relation to the radio button as this sounds like it is the issue. Radio buttons are not known to be an issue. It sounds like you have some sort of form containing radio buttons that users have to submit. If that is the case, check the path on the submit script.
          • 2. Re: Radio Buttons in HTMLHelp
            Level 2

            Colum is right in that it is your script on the submit button. It is interesting that it works when you compile to webHelp but not to a CHM. I work exclusively in CHM files, so I don't know why it might work in one and not the other. I don't use a submit button with radio buttons in chm files but I only use radio buttons for variable text within a topic.

            In your true code, you should have a <INPUT TYPE=BUTTON NAME="Submit" ... ONCLICK="scriptname">
            Find the 'scriptname' function in your topic and let us know what it says. Also what you'd like to have happen when the user clicks 'Submit.'


            • 3. Re: Radio Buttons in HTMLHelp
              kirsten10 Level 1
              Thanks for the replies. What I am trying to do is if you click the "Submit" button, you will send your input to a new page. I really can't figure out where the problem lies as it works perfectly fine with WebHelp.
              • 4. Re: Radio Buttons in HTMLHelp
                RoboColum(n) Level 5
                Try looking at the link again and the location of the CHM file in relation to it. If you generate your webhelp to a different location maybe that is the issue.
                • 5. Re: Radio Buttons in HTMLHelp
                  Level 2
                  Forms can be handled very differently on the web and in a chm file. If you want you can send me your topic and I'll have a look at it. Perhaps, I'll be able to make some recommendations. Click on my name to send email.
                  • 6. Re: Radio Buttons in HTMLHelp
                    kirsten10 Level 1
                    Have managed to solve my issue through my husband's help. LOL. Thanks a lot for the attention.
                    • 7. Re: Radio Buttons in HTMLHelp
                      RoboColum(n) Level 5
                      Hi kirsten10.
                      Do you mind letting us all know the solution? It would help others in the future with a similar issue.
                      • 8. Re: Radio Buttons in HTMLHelp
                        kirsten10 Level 1
                        Here's the solution;

                        <title>First Topic</title>

                        <link rel=stylesheet href=default.css>
                        * checkButton function
                        * check which button is checked inside the form
                        * then go to page based on the radio button's value
                        * @param null
                        * @return string buttonvalue
                        function checkButton() {
                        // get number of radio button inside myform
                        var num_buttons = this.myform.radio.length;

                        // loop through each button
                        for (i = 0; i < num_buttons; i++){
                        // check if...ehrmm..checked
                        if(this.myform.radio .checked == true){
                        // get page
                        mypage = this.myform.radio
                        // redirect
                        <robohelp><form name='myform'>
                        <h1>First Topic</h1>
                        <p><input type=radio name=radio value='Submit_1.htm'>Button 1</p>
                        <p><input type=radio name=radio value='Submit_2.htm'>Button 2</p>
                        <p><input type=radio name=radio value='Submit_3.htm'>Button 3</p>

                        <p> </p>
                        <p><input type=button name=submit value='Click Me' onClick='javascript:checkButton()';></p>
                        <p> </p>