23 Oct 2006, 07:14
#1
Totally Zenned
- Join Date:
- Jun 2005
- Posts:
- 1,033
- Plugin Contributions:
- 3
[Done v1.3.6] javascript not validating
Its a simple problem... but there's a javascript snippet being used by several pages that looks like this:
Technically, this does not validate. To see what I mean, just go to validator.w3.org and paste in the source from a login page. Its also on address book, checkout payment, checkout shipping, and create account.
- Steven
<script language="javascript"><!--
function resetZoneSelected(theForm) {
if (theForm.state.value != '') {
theForm.zone_id.selectedIndex = '0';
if (theForm.zone_id.options.length > 0) {
theForm.state.value = '<?php echo JS_STATE_SELECT; ?>';
}
}
}
function update_zone(theForm) {
var NumState = theForm.zone_id.options.length;
var SelectedCountry = "";
while(NumState > 0) {
NumState--;
theForm.zone_id.options[NumState] = null;
}
SelectedCountry = theForm.zone_country_id.options[theForm.zone_country_id.selectedIndex].value;
<?php echo zen_js_zone_list('SelectedCountry', 'theForm', 'zone_id'); ?>
}
//--></script>Technically, this does not validate. To see what I mean, just go to validator.w3.org and paste in the source from a login page. Its also on address book, checkout payment, checkout shipping, and create account.
- Steven