How do you direct someone to a specific page depending on form input?

I have a web form and would like to send the user to a specific page depending on what radio button they check.
For example if they say they like vanilla ice cream (variable = "vanilla") in the form, send them to page "A" once they hit the submit button. If they like chocolate (variable = "chocolate") , send them to page "B" once they hit submit.
Thanks, I really appreciate your help.
Ivan

Although this is not really a java related issue, here is some code that should work for you:
<HTML>
<BODY>
<SCRIPT language="JavaScript">
function checkIce(form)
     if (form.elements["ice"][0].checked) form.action = "http://www.sun.com";
     else if (form.elements["ice"][1].checked) form.action = "http://www.microsoft.com";
     else
          alert ("You'll have to select a flavour!");
          return false;
     return true;
</SCRIPT>
<FORM method="post" onsubmit="checkIce(this)">
<INPUT type="radio" name="ice" id="vanilla">Vanilla Ice Cream
<BR>
<INPUT type="radio" name="ice" id="chocolate">Chocolate Ice Cream
<HR>
<INPUT type="submit">
</FORM>
</BODY>
</HTML>

Similar Messages

  • How to print only certain parts of a page based on form input

    I need to know how to do the following.
    I have a PDF with a listing of five addresses. I need to be able to use radio buttons, check boxes, or something similar in order to select certain addresses, and have only those print. But, I need to keep all the addresses available in the electronic copy, and the addresses can't be editable by others. Other people can only choose to print the sheet showing just the addresses they want, such as 1, 2, and 5.
    Is this possible? If so, how?
    Your help is appreciated!

    One way is to set up five buttons, one for each address. Create a separate PDF for each address and use them as the icon source for each button. To set up a button to use an icon, set its Layout to something other than "Label Only".
    The buttons should be set to be read-only, and not have a background or border color. When the corresponding check box is selected, the address button would get set to be printing, and non-printing if deselected. Use something like the following as the Mouse Up JavaScript for each check box.
    // Mouse Up script for check box
    var f = getField("Address1_button");
    f.display = (event.target.value === "Off") ? display.noPrint : display.visible;
    Replace "Address1_button" with the actual name of the corresponding button.
    Instead of using buttons to display the addresses, you may be able to use text fields. It just depends on the formatting you need.

  • Hi, We are a physiotherapy practice trying to use i-cal as a clinic diary systaem for 15 therapists. We need to block out availability of therapists but cant do this? How can you block someones diary out for specific times on i-cal? Any help please..

    Hi, We are a physiotherapy practice trying to use i-cal as a clinic diary system for 15 therapists. We need to block out availability of therapists but cant do this? How can you block someones diary out for specific times on i-cal? Any help please..

    iCal is designed for personal use, and isn't really meant to handle this sort of situation.
    The best suggestion I can offer, though it's a trifle untidy, is: create a calendar for each therapist, giving each a different colour. Enter the availability for each therapist - if it's on a weekly basis you can make them repeating events. Then add the individual appointments, which will show alongside in the daily view. In this example, the 'purple' therapist is available from 1030 to 1700 and has appointments at 1200 and 1500.
    If you have more than a few therapists available at any one time it's liable to look a bit messy, but it's the best I can think of at the moment.

  • How do you give someone credit for a correct answer?

    How do you give someone credit for answering a question correctly?

    Provided you're the person who posted the original question, click on the blue "Mark as :Correct" or "Helpful" links on the left below the reply.

  • HT4061 how do you take someone  old own icloud  off the phone

    i have just got a iphone4 a ues on e but what i am wanting to no how to i take there old how do you take someone  old own icloud  off the phone so i can use the phone

    Is the phone running iOS 7? If so, then you would need to know the Apple/iCloud ID and password of the previous owner in order to remove the iCloud account from the phone.
    If you don't know the ID and password, then you should return the phone for a refund.
    Sorry,
    GB

  • How do you call someone on your iphone on facetime to an ipod 4th generation?

    How do you call someone on your iphone on facetime to an ipod 4th generation?

    http://manuals.info.apple.com/en_US/iphone_user_guide.pdf

  • How do you put someone on speaker phone in ios7 ??

    What happened to speaker button under phone app?  How do you put someone on speaker phone in ios7 ??

    Only certain things are synced to the computer from the iPhone. The rest should already be resident on the computer. Those things are not able to be synced from the phone to the computer. They are designed to only sync from the computer to the phone, such as music.

  • HOW DO YOU TURN OFF "FIREFOX PREVENTED THIS PAGE FROM AUTOMATICALLY RELOADING". I did the "see Advanced - General - Accessiblity. and still having problems

    HOW DO YOU TURN OFF "FIREFOX PREVENTED THIS PAGE FROM AUTOMATICALLY RELOADING". I did perform the "see Advanced - General - Accessibility. It worked for me and my "user" site (don't know how to say my site) and still having problems with my wife's. I have gone to OPTIONS → GONE TO → ADVANCE and CLICKED THE LINE → ""Warn me when websites try to redirect or reload the page…""
    This did not rememdy the problem. I did try to get on the other site suggested
    http://kb.mozillazine.org/Accessibility.blockautorefresh
    but got a 404 error...
    I have googled the "ff prevented...." and after a number of hours searching I still have not found a fix...
    REALLY HOPE SOMEONE CAN HELP ME....
    JM

    You should still disable this setting:
    *Firefox > Options/Preferences > Advanced > General : Accessibility : [ ] "Warn me when web sites try to redirect or reload the page"
    The setting in "Options > Advanced > General" is meant as an accessibility feature, as you can see by the label of that section, so that people with disabilities or people who use screen readers do not get confused and is not meant as a safety protection to stop redirecting.
    What is the value of the <b>accessibility.blockautorefresh</b> pref on the <b>about:config</b> page?
    *http://kb.mozillazine.org/accessibility.blockautorefresh
    If you have problems with preferences, see:
    *http://kb.mozillazine.org/Preferences_not_saved
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • I am wanting to add picture and designs to my form how do I place it in a specific place on my form?

    I am wanting to add picture and designs to my form how do I place it in a specific place on my form?

    Currently we only support one field/item on a line. We are working on adding a feature that allows you to put multiple fields/items on a single line. We hope to have that out in a few months.
    Randy

  • Once printed how do you fold a pdf so that pages are in reading order?

    Once printed how do you fold a pdf so that pages are in reading order?

    I think I'm not following you. In my opinion, PDFs can't be folded; and whether pages are in reading order or not cannot be changed by the free Reader.

  • I have a file with 64 pages in it.  How do I save and email one specific page out of the file?

    I have a file with 64 pages in it.  How do I save and email one specific page out of that file?

    With nothing but the free Reader? Take a screenshot of the page and email the image.

  • How do you rotate a table in 'new' pages?

    How do you rotate a table in 'new' pages, all my tables have spun round and I cant put them back?

    Thanks I tried to get my original doc back, but it wouldnt open, tried via time machine and that was locked too!
    Eventually had to save as a pages 09 doc, then reopen in pages 09 and turn everything back round
    Think i will stick with the old verision for now!

  • How do you create a mail merge in Pages on Mavericks?

    How do you create a mail merge in Pages on Mavericks?

    Yeah, this and another 100 things Apple dropped.
    Rate/Review Pages 5 in the App Store.
    Peter

  • How do you change the language in iPad Pages?

    How do you change the language in iPad Pages? I tried lookin for it but I can't find it.

    What a lot of confusion in this discussion!
    The language of a text is a property of the text itself. If the keyboard or the language of the OS of the computer is changes afterwards, the language of the text remains what it was.
    Only at the moment when text is typed the keyboard settings may be used to identify the language. If you are able to imagine a text composed of sentences in different languages you should be able to understand this.
    Changing the keyboard in order to change the spellckeck only works at the moment of typing. With texts written earlier it is meaningless.
    When I import a document written in German on my Mac to my iPhone and iPad, Pages on iPhone and iPad do niot recognise that the text is German. The spelling checker underlines everything. And what people complain about here is that we do not find the place where to tell Pages that the existing, imported text is written in a certain language.
    Please stop mixing this up with keyboard issues!

  • How do you batch convert pdfs into single page tiffs?

    How to you batch convert pdfs to single page tiffs?

    If you mean that you want a separate TIFF file for each page in the PDF, try using the saveAs JavaScript method in a batch process (Action): http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.524.html

Maybe you are looking for

  • How do I connect my external hard drive with all of my digital media to my Apple TV network and make it accessable 24/7?

    How do I connect my external hard drive with all of my digital media to my Apple TV network and make it accessable 24/7?  I have the latest Apple TV, ipads, iPhones as well as a solid HP Windows machine all on my home network.  Is there a way that I

  • Using Front Panel Composite Video 2 RCA Jack on the HP m8000 Media Center PC

    I have a HP M8000 Computer with front panel RCA jacks, composite video 2 and Left and Right Audio RCA jacks.  I have been unable to determine how to select  these jacks for inputting video recordings to the computer.  Any ideas on how to use these ja

  • Beta Cam tapes to Digital

    if i have beta cam tapes...how can i digitize the footage into my FCP? i have one of those receiver boxes to transfer old vhs tapes to computer...will that do it? if i have the camera, will that make it easier?

  • Error installing nokia ovi suite

    When I tried to update ovi suite there were errors and it quit updating. So I deleted the program from my laptop, download the new version from the nokia site and tried to instal it. And I get this error all the time: Error 1904.Module C:\Program Fil

  • Sql script OTL

    hi i need to prepare report, list of employee who are on leave today, anybody has SQL script for that. tq