RadioButtonList and JavaScript ... Help

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default RadioButtonList and JavaScript ... Help

    Hi ....

    I have a radiobutton list and a label in a webform.

    <asp:radiobuttonlist id="one" runat="server" CssClass="text"
    AutoPostBack="False" RepeatDirection="Horizontal">
    <asp:ListItem Value="one">one</asp:ListItem>
    <asp:ListItem Value="two">two</asp:ListItem>
    <asp:ListItem Value="three">three</asp:ListItem>
    <asp:ListItem Value="four">four</asp:ListItem>
    <asp:ListItem Value="five">five</asp:ListItem>
    </asp:radiobuttonlist>

    <br>

    <asp:Label id="Label1" runat="server" Visible=False>Label</asp:Label>

    I have set the AutoPostBack to False, as i want to be able to use the
    keyboard to navigate thru' the RadioButtonList.

    Once a particular radiobutton is selected, i want to be able to check with
    RadioButton value selected and then display a hidden label.

    On Page Load, i call the javascript function
    ddPayer.Attributes.Add("onclick", "check()")

    where
    <script language="javascript">
    function check(){

    document.Form1.TextBox1.value = "test";
    document.Form1.Label1.style.visibility = true; --- Drop an error here

    }

    </script>

    I have been able to write a value to a textbox once any radiobutton has been
    selected.

    But i can't seem to trap the value of each of those radiobuttons, so i could
    make it visible.

    Any help is greatly appreciated.


    --
    Thank You,
    Sean


    Sean Guest

  2. Similar Questions and Discussions

    1. RadioButtonList
      Maybe you can help me with the following logic I am trying to accomplish. My RadioButtonList is in datagrid <EditItemTemplate> column If my...
    2. RadioButtonList In DataGrid
      Hi all! I have a page that gets a list of users from a database and puts them into a DataGrid. The DataGrid is editable. In Edit Mode of the...
    3. Radiobuttonlist and cssclass
      I am in the process of updating old asp projects into asp.net. We used to have radiobuttons which had an attached css class as follows: <label...
    4. radiobuttonlist and javascript
      hi I have a checkbox and a radiobuttonlist (the radiobuttonlist contains 2 items) in my form. The radiobuttonlist has its visible property set to...
    5. radiobuttonlist and javascript??
      in your page load function add the following: RadioButtonListName.Attributes.Add("onclick", "return JavascriptFunctionName()"); radiobuttonlist...
  3. #2

    Default Re: RadioButtonList and JavaScript ... Help

    Hello,

    "Sean" <nospam@> schrieb:
    > I have a radiobutton list and a label in a webform.
    >
    > <asp:radiobuttonlist id="one" runat="server" CssClass="text"
    > AutoPostBack="False" RepeatDirection="Horizontal">
    > <asp:ListItem Value="one">one</asp:ListItem>
    > <asp:ListItem Value="two">two</asp:ListItem>
    > <asp:ListItem Value="three">three</asp:ListItem>
    > <asp:ListItem Value="four">four</asp:ListItem>
    Newsgroups for ASP .NET:

    [url]news://news.microsoft.com/microsoft.public.dotnet.framework.aspnet[/url]

    Regards,
    Herfried K. Wagner
    --
    MVP · VB Classic, VB .NET
    [url]http://www.mvps.org/dotnet[/url]


    Herfried K. Wagner Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139