dependent form menu does not update

RESOLVED WORKSFORME

Status

RESOLVED WORKSFORME
14 years ago
14 years ago

People

(Reporter: vlb, Assigned: mikepinkerton)

Tracking

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040825 Camino/0.8.1
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040825 Camino/0.8.1

The page in question has two menus:
    Order Quantity/Price: 
    Shipping Option: 

The Shipping Option menu is dependent on the Order Quantity chosen; the page
submits and recalculates the second menu based on the previous choice.

The page and menu rebilding is handled in JavaScript
Page soource is really ugly but I believe this is the part that is relevant:

<td>
<font id="header">Order Quantity/Price:</font>
</td>
<td>
<font face="Geramond" size="2" id="common2">
<select name="ch_qty" id="common2" onChange="NewChkNum();SubmitForm();">
<option value="Select Quantity">Select Quantity
<option value="1,19,0.00" >1 Box, Qty: 150 ...$19.00
<option value="2,38,0.00" >2 Boxes, Qty: 300 ...$38.00
</select>&nbsp;</font><font color="FF0000" id="header3">*</font>
</td>
</tr>
<tr>
<td>
<font id="header">Shipping Option:</font>
</td>
<td>
<font face="Geramond" size="2" id="common2">
<select name="ch_shipping" id="common2" onChange="CuttOff_ForeignAddress()" >
<option value="Select Shipping">Select Shipping Method</option>
<!-- Added a check for mail class restriction for a tr -->
<option value="B,4.58,3.52">Standard:$4.58 </option> 
<!-- Added a check for mail class restriction for a tr -->
<!-- Added a check for mail class restriction for a tr -->
<option value="F,11.48,4.08">First Class:$11.48</option>
<!-- Added a check for mail class restriction for a tr -->
<option value="+,11.93,4.12">4-Day Delivery:$11.93</option>
<!-- Added a check for mail class restriction for a tr -->
<!-- Added a check for mail class restriction for a tr -->
<!-- Added a check for mail class restriction for a tr -->
</select></font>&nbsp;
<script>
document.checkForm.ch_qty.selectedIndex = 2;
</script>
<script language="JavaScript">
function CuttOff_ForeignAddress(){
var message_pop = "Orders placed by 11 a.m. central standard time will be
produced and shipped out today.\nSame-day production cannot be guaranteed for
orders placed after 11 a.m. Orders\nplaced after 11 a.m. will be shipped by
tomorrow via the delivery method that is\nselected.";
Shipping_Option =
document.checkForm.ch_shipping.options[document.checkForm.ch_shipping.selectedIndex].value;
OptionArr = Shipping_Option.split(",");
Shipping_Code = OptionArr[0];
if (message_pop != "" && Shipping_Code != 'B' && 
Shipping_Code != 'D' && 
Shipping_Code != 'F' && 
Shipping_Code != '+' && 
Shipping_Code != 'S' && 
Shipping_Code != 'U' && 
Shipping_Code != 'Y')
if(!confirm(message_pop))
document.checkForm.ch_shipping.selectedIndex = 0;
}
</script>


Reproducible: Always
Steps to Reproduce:
1. Access order site, choose checks
2. Get to the page where you choose quantity and shipping options
3. Select quantity from menu

Actual Results:  
the shipping options menu remains unchanged (a one item "menu" that says "Select
Quantity Above"). 


Expected Results:  
page should submit itself and fill in an approproate shipping options menu


The page works in Safari. Screen shots were taken using Safari. In Camino,
although the Order Quantity/Price menu changes, the Shipping Option menu remains
as shown in Screens shot 1
(Reporter)

Comment 1

14 years ago
Created attachment 164811 [details]
screen shot 1 - described in body of bug report
(Reporter)

Comment 2

14 years ago
Created attachment 164812 [details]
screen shot 2 - described in body of bug report

the screen shots show what is supposed to happen
(Reporter)

Comment 3

14 years ago
It looks like you probably won't be able to set up an order...  tried with
another account number and they wouldn't take it because they "don't have a
history" for that account number.

I hope the screen shots and the javascript source, along with the explanation,
are a help.

that's the problem with bugs in secured sites.
(Assignee)

Comment 4

14 years ago
does this work in firefox? ie, is it a mozilla bug or a camino-specific bug?
Vicki, can you please update?  This is the oldest UNCO atm.

I pasted the source you provided into an HTML doc and the second menu *always*
showed the four choices in your second screenshot, even when the first menu was
reading "Select Quantity."  The same thing happened in Safari, so I guess more
of the page/form is required.

If the form works in Firefox or the Suite and not in a recent Camino nightly,
can you perhaps load the page fresh, save as HTML complete, edit out any
personal info embedded in the HTML, and upload the page and its associated
folder here?
I'm going to work on creating a testcase of this with the included html/js and
see if we can reproduce this bug. Are there any other sites with dependent form
drop-down menus that come to mind?
I found on example of this with different, but similar JS code.

http://www.javascriptkit.com/howto/tutor_example.htm
(In reply to comment #7)
> I found on example of this with different, but similar JS code.
> 
> http://www.javascriptkit.com/howto/tutor_example.htm

That example is WFM with 20050404.  

I'm not sure what's happening on checkreorderexpress; we need more of the page/JS.
The example that I posted also worked in 0.8.1. I suggest WFM unless we hear
from the reporter of this bug.
(Assignee)

Comment 10

14 years ago
vicky, please reopen if you have another testcase that doesn't work.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.