Hi,
I have not received an answer to the problem below and I am kind of
stuck now
since I can not set any form parameters. May be the way to set
parameters when there
is a java script attached to the select box is totally different since I
read in several emails
about how you test java script. But I am new to all this: may be someone
can just say
how they set a parameter with httpunit when they have a select box like
the one printed
below (with MULTIPLE attribute set)?!
Thanks for your help.
Astrid
Astrid Wagner wrote:
>
>
> Russell Gold wrote:
>
>> At 06:18 PM 3/27/2003 +0100, Astrid Wagner wrote:
>>
>>> I realized that it works with a select box not having MULTIPLE as
>>> attribute (and also java script method
>>> attached the same way). Could it have sth. to do with this
>>> attribute. I tried
>>> setParameter(String, String) as well as
>>> setParameter(String, String[]) ?!
>>
>>
>> I don't understand. Are you saying that it works without MULTIPLE but
>> does not work when the MULTIPLE attribute is specified? And that the
>> onChange attribute is the same in both cases?
>
> There is a select (and script) that looks like this:
> -----
>
><script LANGUAGE="javascript" TYPE="text/javascript">
><!--
>
> countSourceNotEncrypted = 0
>
> function pruneSourceNotEncrypted(myForm, fieldName) {
> return false
> }
>
> function onChangeSourceNotEncrypted(myForm, fieldName) {
>
> if(pruneSourceNotEncrypted(myForm, fieldName)) {
> myForm.DELIVERABLE_1_PROPERTY_134_PRUNE.value = "SourceNotEncrypted"
> }
>
> return true
> }
>
>// -->
></SCRIPT>
>
><select NAME="DELIVERABLE_1_PROPERTY_134_COUNT_0" onChange="return onChangeSourceNotEncrypted(this.form, this.form.DELIVERABLE_1_PROPERTY_134_COUNT_0)">
><option VALUE="True">True
><option VALUE="False">False
></select>
>
>
> -----
>
> and I can call form.setParameter("DELIVERABLE_1_PROPERTY_134_COUNT_0",
> "False");
>
> Then there is a select (and script) in the same page that looks like this:
> -------
>
><script LANGUAGE="javascript" TYPE="text/javascript">
><!--
>
> countType = 0
>
> function pruneType(myForm, fieldName) {
> return false
> }
>
> function onChangeType(myForm, fieldName) {
>
> if(pruneType(myForm, fieldName)) {
> myForm.DELIVERABLE_1_PROPERTY_18_PRUNE.value = "VCType"
> }
>
> return true
> }
>
>// -->
></SCRIPT>
>
><select NAME="DELIVERABLE_1_PROPERTY_18_COUNT_0" SIZE="5" MULTIPLE onChange="return onChangeType(this.form, this.form.DELIVERABLE_1_PROPERTY_18_COUNT_0)">
><option VALUE="Hard">Hard
><option VALUE="Soft">Soft
><option VALUE="Analog">Analog
><option VALUE="Library">Library
></select>
>
>
> -------
>
> When I try to call
> form.setParameter("DELIVERABLE_1_PROPERTY_18_COUNT_0", values);
> where values is a String array containing only one entry "Soft" I
> receive the error:
> Error: Parameter 'DELIVERABLE_1_PROPERTY_18_COUNT_0' must have the
> value ''. Attempted to set it to: { Soft }
>
> Thanks for the help.
> Astrid
>
>>
>>
>> What does your "onChange" method look like?
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by:
>> The Definitive IT and Networking Event. Be There!
>> NetWorld+Interop Las Vegas 2003 -- Register today!
>> http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
>> _______________________________________________
>> Httpunit-develop mailing list
>> Httpunit-develop@...
>> https://lists.sourceforge.net/lists/listinfo/httpunit-develop
>
>
|