without pressing any buttons???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Cem Louis

    #1

    without pressing any buttons???

    Hi,

    I have a page with 4 radiobuttons on it and no buttons on it. I want
    to post the value of the selected radio button to the other page
    without pressing any buttons (with only selecting the radio button)
    How can I accomplish this??? I made a code block like below but
    couldn't make it work???

    Thank you,
    Cem Louis

    <html>
    <head>
    </head>
    <SCRIPT LANGUAGE="Javas cript">
    function Submit(){
    document.getEle mentById("form1 ").Submit()
    }
    </SCRIPT>
    <form name="form1" method="post" action="process .php">
    <input name="radiobutt on" type="radio" value="radiobut ton"
    onClick="Submit ()">Apple<br>
    <input name="radiobutt on" type="radio" value="radiobut ton"
    onClick="Submit ()">Banana<br >
    <input name="radiobutt on" type="radio" value="radiobut ton"
    onClick="Submit ()">Peach<br>
    <input name="radiobutt on" type="radio" value="radiobut ton"
    onClick="Submit ()">Melon
    </form>
  • McKirahan

    #2
    Re: without pressing any buttons???

    "Cem Louis" <cemlouis@phrea ker.net> wrote in message
    news:12636200.0 410111216.60347 63f@posting.goo gle.com...[color=blue]
    > Hi,
    >
    > I have a page with 4 radiobuttons on it and no buttons on it. I want
    > to post the value of the selected radio button to the other page
    > without pressing any buttons (with only selecting the radio button)
    > How can I accomplish this??? I made a code block like below but
    > couldn't make it work???
    >
    > Thank you,
    > Cem Louis
    >
    > <html>
    > <head>
    > </head>
    > <SCRIPT LANGUAGE="Javas cript">
    > function Submit(){
    > document.getEle mentById("form1 ").Submit()
    > }
    > </SCRIPT>
    > <form name="form1" method="post" action="process .php">
    > <input name="radiobutt on" type="radio" value="radiobut ton"
    > onClick="Submit ()">Apple<br>
    > <input name="radiobutt on" type="radio" value="radiobut ton"
    > onClick="Submit ()">Banana<br >
    > <input name="radiobutt on" type="radio" value="radiobut ton"
    > onClick="Submit ()">Peach<br>
    > <input name="radiobutt on" type="radio" value="radiobut ton"
    > onClick="Submit ()">Melon
    > </form>[/color]

    Try lowercase "s" for ".submit()" .


    Comment

    • Ivo

      #3
      Re: without pressing any buttons???

      "McKirahan" wrote[color=blue]
      > "Cem Louis" wrote[color=green]
      > > <input name="radiobutt on" type="radio" value="radiobut ton"
      > > onClick="Submit ()">Melon
      > > </form>[/color]
      >
      > Try lowercase "s" for ".submit()" .[/color]

      And just for the sake of completeness and crossbrowsernes s, you might
      as well write it in full:

      onclick=" this.form.submi t(); "

      --
      Ivo




      Comment

      Working...