Get value on page refresh

Discussion in 'ASP General' started by peashoe, Jul 5, 2006.

  1. peashoe

    peashoe Guest

    I have a simple page that has a dropdown and I need to populate a
    textbox with the onchange event. How can I do that? My page refreshes,
    but I don't know how to 'get' the value of the dropdown. Here is some
    of my code.

    <form name="ClassForm" method="Post" action="ClassEdit.asp?m=c">
    <td><div class="textB">Location:</td>
    <td><select size="1" name="LocationID"
    onchange="document.ClassForm.submit();">

    ' Generate choices for Location pull-down box. An inactive location
    will be flagged with *.
    query = "select ID as Result," _
    & " case when City is not null and City <> '' then City + ': ' +
    LocationName else LocationName end as Choice," _
    & " case when IsInactive=1 then '*' else '' end as Flag" _
    & " from LocationTop order by City, ListOrder"
    GenerateOptions Conn, query, sLocationID
    </select></div></td>
    </tr>
    <tr>

    'Max Registration will be prepopulated with Location dropdown onchange
    event
    <td><div class="textB">Maximum Registrations:</td>
    <td><input type="text" name="MaxRegistrations" size="3"
    value="????"></div></td>

    thanks in advance
     
    peashoe, Jul 5, 2006
    #1
    1. Advertising

  2. peashoe wrote:
    > I have a simple page that has a dropdown and I need to populate a
    > textbox with the onchange event. How can I do that? My page refreshes,
    > but I don't know how to 'get' the value of the dropdown. Here is some
    > of my code.

    http://www.aspfaq.com/show.asp?id=2270
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Jul 5, 2006
    #2
    1. Advertising

  3. peashoe

    peashoe Guest

    Exactly what I was looking for - THANKS!
     
    peashoe, Jul 5, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. brian lanning
    Replies:
    0
    Views:
    617
    brian lanning
    Jul 29, 2003
  2. Per Magnus L?vold
    Replies:
    1
    Views:
    5,189
    John C. Bollinger
    Oct 8, 2004
  3. Pkenty
    Replies:
    0
    Views:
    420
    Pkenty
    May 28, 2004
  4. Jawahar Rajan
    Replies:
    1
    Views:
    307
    Adrienne
    Oct 1, 2003
  5. Mike Brearley

    how to get value from page.asp?value=myvalue

    Mike Brearley, May 14, 2004, in forum: ASP General
    Replies:
    1
    Views:
    142
    Mike Brearley
    May 14, 2004
Loading...

Share This Page