IIS ASP - Problem - Parsing information using onchange in two select fields

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > May 2005 > Problem - Parsing information using onchange in two select fields





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Problem - Parsing information using onchange in two select fields
please-answer-here

2005-05-30, 5:52 pm

Scenario:

I'm having an asp page with a form with an action pointing to itself. The
reason for that, it that the asp page depending on changes in any of two
select fields with data from 2 different databasetables are going to
populate a third select field.

what I have done is something like:

response.write("<select size=""1"" name=""fabrikat""
onchange=""document.forms[0].submit()"" >")
response.write("<select size=""1"" name=""type""
onchange=""document.forms[0].submit()"" >")

what I very much would like was a way that I in the asp page when it got
reloaded could check which of the "select" fields have generated the submit.
If I had used submit buttons I could have used a querystring, but as the
reload of the page sholud happen transparent to the user it is out of the
question

regards
Henning


Giles

2005-05-30, 5:52 pm

> response.write("<select size=""1"" name=""fabrikat""
> onchange=""document.forms[0].submit()"" >")
> response.write("<select size=""1"" name=""type""
> onchange=""document.forms[0].submit()"" >")
>
> what I very much would like was a way that I in the asp page when it got
> reloaded could check which of the "select" fields have generated the
> submit.


Try
<input type="hidden" name="WhichSelect">
<select size=""1"" name=""fabrikat""
onchange="document.forms[0].WhichSelect.value="fabrikat";document.forms[0].submit()">

and for the other one:
onchange="document.forms[0].WhichSelect.value="type";document.forms[0].submit()">

Hope that helps
Giles


please-answer-here

2005-05-30, 8:48 pm

Giles wrote:
>
> Try
> <input type="hidden" name="WhichSelect">
> <select size=""1"" name=""fabrikat""
> onchange="document.forms[0].WhichSelect.value="fabrikat";document.forms[0].submit()">
>
> and for the other one:
> onchange="document.forms[0].WhichSelect.value="type";document.forms[0].submit()">
>
> Hope that helps
> Giles


Thanks very much. That was just what I needed


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com