------=_NextPart_000_010E_01C4E113.74752900
Content-Type: text/plain;
charset="iso-8859-9"
Content-Transfer-Encoding: 7bit
Hi there,
Someone please help me with this.
I'm trying to select value from two select boxes and submit the form. But
the select boxes are filled via javascript codes. The source code looks like
this:
................
<select name="productSearch1:lbCategories" size="10" multiple="multiple"
id="productSearch1_lbCategories" class="urun_arama_field"
OnChange="lbCategories_onChange();" style="width:150px;">
</select></td>
<td class="urun_arama_back2" align="center">
<select name="productSearch1:lbSubcategories" size="10" multiple="multiple"
id="productSearch1_lbSubcategories" class="urun_arama_field"
OnChange="lbSubcategories_onChange();" style="width:150px;">
..............
............
<script language="javascript">
var
lbCategories=window.top.document.getElementById("ProductSear ch1_lbCategories
");
var
lbSubcategories=window.top.document.getElementById("ProductS earch1_lbSubcate
gories");
var lbBrands=window.top.document.getElementById("ProductSearch1_ lbBrand");
</script>
I know what values to send via this select boxes but unfortunately I can't
set them to those values.
I tried:
$mech -> form_name(Form1);
$mech -> select('productSearch1:lbCategories', $_[0]);
$mech -> select('productSearch1:lbSubcategories', $_[1]);
$mech -> submit();
which yields
input 'productSearch1:lbCategories' not found
input 'productSearch1:lbSubcategories' not found
and
$mech -> form_name(Form1);
$mech -> set_fields('productSearch1:lbCategories' => $_[0],
'productSearch1:lbSubcategories' => $_[1],);
$mech -> submit();
which yields
No such field 'productSearch1:lbSubcategories'
I'm not sure if I can use set_visible.
I came across the same problem in another site but then I solved my problem
by writing the values with the URL. (.../search.aspx?category=XYZ&brand=XYZ)
but this time the form method is POST. So that trick doesn't work:-(
Anyone have any idea how to send these input values? Thanks in advance.
------=_NextPart_000_010E_01C4E113.74752900--
