Results 1 to 2 of 2

Thread: Call javascript from asp.net page

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    Call javascript from asp.net page

    I have 2 .net radio buttons on my page.

    When the user clicks a button I want to change the contents/source of a drop down box on my page without doing the round trip to the server.

    E.g.

    If radio button 1 clicked then
    call poDropDown1()
    else
    call dropdown2()
    End if

    Can anyone point me in the right direction ?
    The dropdown must be populated from 1 or other of the .net methods.

    Thanks in Advance

    Parksie

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    I think in the radio button contol, put an onclick= statement in. I haven't verified it, but that was what I read in a book somewhere. Then, if you also want server side code to execute, you would put a onserverclick= statement.
    Code:
    <asp:RadioButton ID=blah onclick=poDropDown1() ; />
    With this way, you are going to point both radio buttons to the same method, and that method needs to figure out which one clicked.

Posting Permissions

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



Click Here to Expand Forum to Full Width