On May 19, 1:07 pm, "Jo Claes" <jcl...@skynet.bewrote:
Hi,
and what if you have two params fe.
provideroftheframe.php?lang=en&category=1
clicking flag will change the language and a dropdown list using the
category ?
Then you have a different solution, obviously. The previous one has
been given for what you asked in the original post.
For more complicated situations you have to decide if:
a) all possible URL parameters can be stored in form controls.
b) URL parameters cannot be hardcoded but must be calculated client-
side depending on user input.
In case a) you still don't need any javascript
:
<iframe name="MyIFRAME" src="provideroftheframe.php?lang=en">
<form target="MyIFRAME" method="GET" action="provideroftheframe.php">
<input type="text" name="lang" value="es">
<input type="text" name="category" value="1">
<input type="submit">
</form>
Obviously you can use any needed control types, text boxes are used
only for simplicity.
In case b) you need to query form controls for current values,
validate the input, make the needed calculations based on it, generate
URL string and assign iframe's window.href property to get new page.
An abstract description of all these operations would be effectively
equal to a set of posts with Javascript introductory lessons; thus if
the variant b) is your case then please post the entire page your are
working with with the exact explanation what form controls do you
want to use for URL generation and by what algorithm. A demonstration
of your initial attempt to solve the problem - even if failed - would
be also much appreciated.