/    Sign up×
Community /Pin to ProfileBookmark

HTML Radio Button

I had two questions about HTML.

1. If I put a reset Button at the Bottom of my page I want to call a html file when the Button is pressed similar to a <A HREF>. Can I do this w/ a button

  • 2. Also if I have a series of Radio buttons. For example, I have 5 questions each followed by 2 radio buttons. If the user reads question 1 they answer by selecting a Radio button either Yes or No. I want to assign a point system. For example, if a question is answered as YES then I add 1 point. If NO is selected then a point is subtracted. So I could have a grand total of 5 points if all questions were answered as YES. I just need to keep a score or a total of all “Yes’s” that were selected. Is this possible w/ HTML
  • Thanks

    to post a comment
    HTML

    1 Comments(s)

    Copy linkTweet thisAlerts:
    @fredmvJan 12.2004 — [list=1]
  • [*]You sure can:&lt;input type="reset" onclick="location='foo.html';return true;" /&gt;Another method would be something like this (and, even better since it will work even if the user doesn't have support for JavaScript):&lt;form action="foo.html" method="get"&gt;
    &lt;div&gt;
    &lt;input type="submit" value="bar" /&gt;
    &lt;/div&gt;
    &lt;/form&gt;
  • [*]That is not possible with pure HTML. You could either use JavaScript or a server-side language (PHP, Perl, etc.) for that.
  • [/list]
    ×

    Success!

    Help @lyar spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.5,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...