View Single Post
  #78  
Old 06-16-2005, 07:58 AM
  GriffithLea's Avatar 
GriffithLea GriffithLea is offline
 

Member
  
Join Date: Jun 2005
Location: Houston, TX
Posts: 28
 

Default

I forgot to ask something in my previous post. Can someone explain the change_states function to me? There seems to be three lines of code necessary to copy the billing state down to the shipping state, and I don't quite understand what's going on there. I did notice that the drop-down for the state differs from the title and country in that a SPAN is used in conjunction with some javascript instead of INPUT with a bunch of OPTIONs. So I understand that it *needs* to be different, but it's the how that confuses me.

For example, all the copybilling.js examples I've seen here say

Code:
change_states(document.getElementById('s_country'), 's_state', 'State/Province', '', '', '', '');

Why does it reference s_country? I thought we were changing the state!

Also, I thought change_states had 10 args, but the example above supplies 7 .

Finally, why "State/Province" ? It appears from looking at change_states_js.tpl that the 3rd arg is supposed to be the County (which I don't happen to use).

Anyway, I can't really complain, because it all seems to work, but there's nothing that upsets my apple cart worse than something that looks like it shouldn't work, but does.

Griff
__________________
Started out with Version 4.0.13 .
Upgraded to Version 4.0.14 on 27 Jun 2005 .
Upgraded to Version 4.0.17 on 04 Dec 2005 .
Upgraded to Version 4.0.19 on 24 Oct 2006 .
Reply With Quote