|
Posted by Tyrone Slothrop on 09/30/58 11:23
On Sun, 7 Aug 2005 18:18:47 +0200, "The Legend" <inavlid@invalid.com>
wrote:
> Not quite what i ment,
> i would rather put those into distinct vars.
> I am testing your solution right now and besides the string_var correction
>of the second rplaats in option
> cant get the 2 vars into distinct vars on the next page to put them into
>the mysql statement.
> putted the list command onto the form page and onto the next page and apart
>
> While testing local i sense some performance decrease so if you have a
>solution to a distinct vars i would be very thankfull.
>
>thanks ,
>
>Ed
Ed:
If there is a 1:1 relationship between rplaats and var2, you can run a
select query to determine the var2 based on the value of rplaats on
the result page. Other than that, you could pass the index of the
rplaats value, though that is not very efficient either since you
would have to pass both arrays or run a select query on the other end
as well to determine the actual values.
If you want to get really tricky, you can run some JS to populate the
var2 value in real time using an iframe, though I don't think this
really calls for it. Write a JS function to pass the selected value
of rplaats to the iframe and run a query based on the value of the
query string. Then you can have a hidden var to pass back to the
form. However, if the user does not select anything or JS is turned
off this is not a possibility.
Another possibility just crossed my mind. You can create an array of
possible values of var2 and pass an index onChange of the select --
the value can be populated with JS. Again, this gets rather complex
and is not 100% reliable.
I am not sure why the values are not being passed to the query by
using a delimited value for the select box. This is as simple as it
can get. Is this a POST or GET?
BTW, sorry about the typo. I had just awakened and was on the first
cup of coffeee. ;-)
Navigation:
[Reply to this message]
|