I am trying to pass an HTML element, which is an array, to another form. Not so difficult, I'd say, but I tried almost all possible combinations, and it doesn't work.
I have a form where I have this SELECT element:
Expand|Select|Wrap|Line Numbers
- <select name="preselectedCountries[]" size="9" multiple="multiple">
- <option value="Albania">Albania</option>
- <option value="Algeria">Algeria</option>
And I have another form:
Expand|Select|Wrap|Line Numbers
- <form method="post" name="formGeneric" action="">
- <input type='hidden' name='preselectedCountries[]' value='' />
Now, I'd like to hand over the selection from the first form to the second. Tried it in various forms like:
Expand|Select|Wrap|Line Numbers
- <a href="#" onclick="document.formGeneric.preselectedCountries = document.formIndex.preselectedCountries;"
Expand|Select|Wrap|Line Numbers
- <a href="#" onclick="document.formGeneric.preselectedCountries[] = document.formIndex.preselectedCountries[];"
I have searched around quite a bit, but did not find the solution. Can anyone give me a tip?! I would very much appreciate that. Thanks!