Ok, the javascript successfully works now, but I can not save the interface config when I select "6rd" and press save.
Probably unrelated to your fix.
It will revert to "none" and none of the data will have saved.
a print_r() of that section reveals that only prefix-6rd-len is set. So nothing was saved.
[wan] => Array
(
[enable] =>
[if] => em0
[blockbogons] =>
[descr] => WAN
[spoofmac] =>
[prefix-6rd-len] => 3
[ipaddr] => 82.94.161.155
[subnet] => 27
[gateway] => GW_WAN
)
Live HTTP Headers said this:
enable=yes&descr=WAN&type=staticv4&type6=srd&spoofmac=&mtu=&mss=&mediaopt=&ipaddr=10.94.161.155&subnet=27&gateway=GW_WAN&defaultgw=on&name=WANGW&gatewayip=&gatewaydescr=&ipaddrv6=&subnetv6=128&gatewayv6=none&defaultgwv6=on&namev6=WANGWv6&gatewayipv6=&gatewaydescrv6=&dhcp6-pd-sla-id=none&prefix-6rd-id=none&dhcphostname=&alias-address=&alias-subnet=32&dhcp6-duid=&dhcp6-ia-pd-len=none&prefix-6rd=2602%3A300%3A%3A%2F28&gateway-6rd=12.83.49.81&prefix-6rd-v4plen=0&country=&provider=&providerplan=&username=&password=&phone=&apn=&port=%2Fdev%2Fcuau0&pppoe_username=&pppoe_password=&provider=&pppoe_idletimeout=&pppoe-reset-type=&pppoe_resethour=0&pppoe_resetminute=0&pppoe_resetdate=&pptp_username=&pptp_password=&pptp_local=&pptp_subnet=31&pptp_remote=&pptp_idletimeout=&blockbogons=yes&Submit=Save&if=wan&ptpid=0
So the variable are being sent, but not saved.