Radio Buttons

Discussion in 'Java' started by Rick, Apr 24, 2004.

  1. Rick

    Rick Guest

    I am having a problem getting the value of my radio buttons. I am new to
    Java please help me see my error if you can. THANKS soooo much.

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin Hiding Script

    function ShipSame()

    var d = document.usernew;

    var theone=document.usernew.Pay1.selectedIndex;
    var theone=document.forms[0].Pay1.value;

    if ( document.usernew.Pay1.value == '1')
    result2 = 29.95;
    result1 = 0;}

    {result1 = 0;
    result2 = 0;}

    {result = result2+result1
    document.forms[0].Price.value = result;}


    // END Hiding Script -->

    <form action="" method="post" name="usernew">
    <table width="400" border="0" cellspacing="0" cellpadding="0">
    <tr align="center">
    <td colspan="3">BASE WITH ACCIDENT PLAN</td>
    <td width="147">Individual</td>
    <td width="123">Family</td>
    <td width="130">&nbsp;</td>
    <input type='radio' name='Pay1' value='1' onClick='ShipSame()'>
    $29.95 monthly</td>
    <input name="Pay1" type="radio" onClick="ShipSame()" value="NO">
    $39.95 monthly </td>
    <p>&nbsp; </p>
    <input name="Price" type="text" size="20">
    Rick, Apr 24, 2004
    1. Advertisements

  2. Andrew Thompson, Apr 24, 2004
    1. Advertisements

  3. Rick

    Rick Guest

    Sorry about that but it would have been kind of you to tell me what the
    right group is.
    I have been posting in news groups for over 20 years and kindness seems to
    be a ting of the past.
    Rick, Apr 24, 2004
  4. Oh boo hoo.

    If you had checked the link carefully,
    you'd have found your way.

    Here it is _again_.
    Still trying to track down
    that first answer, then? ;-)
    Andrew Thompson, Apr 24, 2004
  5. Rick

    Rick Guest

    I looked at the link it was not very clear to someone just getting in to
    this. But that is ok the whole world has that attitude. That is what is
    wrong everyone thinks because they have a piece of knowledge someone else
    does not have that other person is too stupid to help. No one is humble
    enough to say you know that might be a nice thing to do.

    Rick, Apr 24, 2004
  6. Rick

    Chris Uppal Guest

    Please, just ignore Andrew. Sometimes he's helpful, interesting, or amusing;
    too often he acts the complete fuckwit.

    Sign of the times...[*]

    -- chris

    [*] to the overall hostility of which I realise that this post does not fail to
    contribute, but my patience is wearing thin.
    Chris Uppal, Apr 24, 2004
  7. What, news-groups? You said you had
    20+ years experience.

    It is hard to believe that anyone with your
    experience did not have the common sense to
    lurk before posting, check the FAQ, Google
    the group.

    Any of those things would have warned you
    that this was an inappropriate group to
    make your post.

    My time is too limited to spoon feed
    every person that comes along. That
    is why I put things in links that are
    easily accessible, and in the case where
    another person has a page that explains
    an FAQ well, I will link to _that_ rather
    than 'reinvent the wheel'..

    So, in closing..
    <, or+your+money+back!&type=alert>

    Andrew Thompson, Apr 24, 2004
  8. I would like to put a question to you Chris.

    Do you feel the link I gave originally,
    provided enough information to set the OP
    on the right track?

    If it did not - I want to improve it.
    All suggestions welcome.
    As does mine, we are all human.
    Andrew Thompson, Apr 24, 2004
  9. I'm very surprised that in your 20+ years of using newsgroups, no one has
    ever told you not to top-post.

    IMO, Andrew was completely justified in his answer. The link he gave clearly
    states the group the you were supposed to go to. If you are not willing to
    look at the link/try to understand it, but instead decide to start whining,
    that is your problem. But it sure doesn't show well on you.

    Seriously, what the hell is not clear about the following entry?

    I am asking how to write java script, why are people telling me I have the
    wrong group?

    Java and JavaScript are different languages. Java Vs. JavaScript explains
    the differences between them. Once you have worked out which one you need,
    try comp.lang.javascript, or,*
    Christophe Vanfleteren, Apr 24, 2004
  10. Rick

    mromarkhan Guest

    Peace be unto you.
    Maybe there exist an easier
    more standard compliant

    <title>Fruits of the World</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin Hiding Script

    function FruitName()

    var d = document.usernew;
    var payone= d.elements["Pay1"];
    for(i=0; i < payone.length; i++)
    // processing logic for
    // that index
    // END Hiding Script -->

    Select a fruit:
    <form action="" method="post" name="usernew">
    <input name="Pay1" type="radio" onClick="FruitName()" value="Apple">Apple
    <input name="Pay1" type="radio" onClick="FruitName()" value="Mango">Mango
    <input name="Pay1" type="radio" onClick="FruitName()" value="Tomato">Tomato
    <input name="Pay1" type="radio" onClick="FruitName()" value="Pineapple">Pineapple

    Have a good day.
    mromarkhan, Apr 25, 2004
  11. Rick

    Roedy Green Guest

    They also forget that there was a time when they too did not have that
    piece of knowledge either.

    If Java is to succeed it will be because lots of people go through
    the pain of learning Java. Why on earth would some people try to make
    it MORE painful for the newbies is beyond me. It is sort of like
    hazing at a frat.
    Roedy Green, Apr 25, 2004
  12. Rick

    Roedy Green Guest

    Stop playing one-upmanship games and answer the question.

    Roedy Green, Apr 25, 2004
  13. Rick

    Roedy Green Guest

    And I am surprised your mommy did not warn you about doing everything
    strangers tell you to do. There are good reasons for top posting. I
    find it far less annoying than quoting material not directly
    commented on.

    You can request people post in the style you like, but it is free
    planet and people are free to express themselves in whatever form they
    like. If it bothers you that much, plonk them.
    Roedy Green, Apr 25, 2004
  14. Wrong. I am not trying to 'make it MORE
    painful for the newbies'. I am trying to
    keep groups practical for those on dial-up
    (for starters).

    There are groups to which I have subscribed
    that become so flooded with screaming, complaining..
    1) 'answer me NOW!'...
    2)'s my 400 lines of code, what is wrong?
    3) Can someone send me the codes?
    ...newbies that the bandwidth
    was too much and I had to drop them.

    I suspect this is a choice every UseNet
    contributor has had to make.

    Are we to stand by and allow such
    people to swamp a group in dross?

    Obviously, there are different attitudes.
    I doubt few of those criticising my choice
    would see the situation as I do.

    I just thought I should state publicly,
    that while sometimes I get a bit carried
    away, and other times I make a 'c.l.j.p'
    rebuke in 'c.l.j.h', I do not say what I
    do to 'make it hard' for _anyone_.

    One reason I take a tongue-in-cheek attitude
    in the first instance is that I find it is a
    good barometer of the poster's mindset.

    It quickly either sets the poster on a
    different path 'Sorry, about the big post,
    I'll try better..'[*] or reveals the person
    as someone prone to screaming hissy fits
    'how DARE you.., I have been posting XX
    years and never.. none of the OTHER groups
    are like this...' (yada yada).

    No, if I start sarcastic and then need to
    get terse in order to keep such people from
    flooding the group, I will continue to do so,
    ....for the sake of the _group_.

    [*] I think history will show that I
    get over bad posting practices quickly,
    and that I have gone on to help people whom
    I might at the outset have delivered rather
    'short, sharp advice'..

    Next time you see something I say that
    makes you cringe, ask yourself the simple

    Does this person deserve an answer _more_
    than the student dialing in through a slow
    connection, someone who is prepared to
    do some research, formulate an intelligent
    question, then post that question to an
    appropriate group?

    For your consideration..
    Andrew Thompson, Apr 25, 2004
  15. I have yet to hear them, and yes,
    there have been threads in which I
    have participated in which it was
    thrashed over, looked at from many

    "Google cuts long posts"
    a) it does not, it links to full text
    b) posters should trim as far as practical

    "My reader puts the blinking cursor at the top"

    "Blind people top-post"
    There are not that many blind people who
    are software developers, and even on
    alt.comp.blind-users, it is a mix of
    top and bottom posters.
    Well... which top-posters _exactly_
    trim non-relevant material?

    Trimming irrelevant material is something
    I underline here..
    Straight after speaking against top-posting,
    I warn of the disadvantages of not trimming.

    Something that makes it a good moment to
    request (OK, ..urge) _everybody_ to
    make use of this (magical) key..

    [ ..Please ;-) ]
    Andrew Thompson, Apr 25, 2004
  16. I'm sorry Roedy, but Andrew had given that answer in his very first reply.

    Once again, no one here has told what exactly is wrong with the entry in
    Andrew's FAQ:

    I am asking how to write java script, why are people telling me I have the
    wrong group?

    Java and JavaScript are different languages. Java Vs. JavaScript explains
    the differences between them. Once you have worked out which one you need,
    try comp.lang.javascript, or,*

    <Andrews original post>
    You are in the wrong group..
    </Andrews original post>

    If you think there is anything wrong with this answer, let Andrew know, so
    he can improve it.
    Christophe Vanfleteren, Apr 25, 2004
  17. Rick

    Tony Morris Guest

    I have been posting in news groups for over 20 years and kindness seems to
    Out of pure curiosity, what kind of newsgroups were they ?
    They can't have been NNTP based newsgroups, since the RFC was published in
    February, 1986.
    BBS based newsgroups ? I find it hard to believe that someone who is
    capable of operating a system to use BBS cannot differentiate between two
    unrelated (loosely speaking) technologies.

    We've all bullshitted about before, but it's time to come to the party.
    Andrew has made a good point (along with appropriate references), accept it,
    get over it, move on.

    Tony Morris
    (BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
    Software Engineer
    IBM Australia - Tivoli Security Software
    (2003 VTR1000F)
    Tony Morris, Apr 25, 2004
  18. Rick

    Roedy Green Guest

    Usually you try to answer the question if it can be answered in a
    phrase or sentence, with a URL in case that was not sufficient.
    Especially for someone who looks lost.

    People tend to decorate their post with all manner of URLs, most of
    which are tagline related rather than question related. I use the
    word "see" to hint it has something to do with the question.

    A URL should be self explanatory what it points to. If not it needs a
    short description, e.g. for tinyurls.

    If course I answer more posts that anyone with nothing but a bare URL,
    but in my defence, I do this most often just to supplement somebody
    else's answer.
    Roedy Green, Apr 26, 2004
  19. Rick

    Roedy Green Guest

    That is why you shepherd them into the paths of righteousness. That is
    not why you bite their heads off.
    Roedy Green, Apr 26, 2004
  20. Rick

    Roedy Green Guest

    We BIXen (Byte Information Exchange) were doing newsgroups long before
    the Internet using CoSy and X.25 circa 1985. Topics were
    after-posting moderated. There was a no-adhominem rule. Off topic
    posts got moved. Flame wars were squelched.

    It was a much more pleasant experience. The no expletives rule was a
    bit confining at times. You had to find creative ways to be rude.

    It created a much more co-operative ambience.
    Roedy Green, Apr 26, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.