Home All Groups Group Topic Archive Search About

Get value on page refresh



Author
5 Jul 2006 12:43 PM
peashoe
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

Author
5 Jul 2006 1:46 PM
Bob Barrows [MVP]
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.
Author
5 Jul 2006 2:15 PM
peashoe
Exactly what I was looking for - THANKS!

AddThis Social Bookmark Button