Mr Bob |
11-20-2005 01:10 AM |
Javascript in odd places (fails validation)
Good ole document type does not allow element "script" here
There is an issue with the place that the javascript is being placed. Issue is in both the check_options.tpl and the customer_options.tpl file.
How do you get around this failed validation?
The customer_options.tpl file:
Code:
{* $Id: customer_options.tpl,v 1.16.2.4 2005/03/02 06:16:56 max Exp $ *}
{if $product_options ne ''}
<script type="text/javascript" language="JavaScript 1.2">
var alert_msg = '{$alert_msg}';
</script>
{include file="modules/Product_Options/check_options.tpl"}
{foreach from=$product_options item=v}
{if $v.options ne '' || $v.is_modifier eq 'T'}
<tr>
<td valign="middle" height="25">{if $usertype eq "A"}{$v.class}{else}{$v.classtext|default:$v.class}{/if}</td>
<td valign="middle">
{if $cname ne ""}
{assign var="poname" value="$cname[`$v.classid`]"}
{else}
{assign var="poname" value="product_options[`$v.classid`]"}
{/if}
{if $v.is_modifier eq 'T'}
<input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}">
{else}
<select id="po{$v.classid}" name="{$poname}"{if $disable} disabled{/if} onchange="javascript: check_options();">
{foreach from=$v.options item=o}
<option value="{$o.optionid}"{if $o.selected eq 'Y'} selected{/if}>{$o.option_name}{if $v.is_modifier eq 'Y' && $o.price_modifier ne 0} {/if}</option>
{/foreach}
</select>
{/if}
</td>
</tr>
{/if}
{/foreach}
{/if}
{if $product_options_ex ne ""}
<tr>
<td colspan="2"><font id="exception_msg" color="red">{if $err ne ''}{/if}</font></td>
</tr>
{if $err ne ''}
<tr>
<td colspan="2"><FONT class="CustomerMessage">{$lng.txt_product_options_combinations_warn}:</FONT></td>
</tr>
{foreach from=$product_options_ex item=v}
<tr>
<td>{foreach from=$v item=o}{if $usertype eq "A"}{$o.class}{else}{$o.classtext}{/if}: {$o.option_name}
{/foreach}
</td>
</tr>
{/foreach}
{/if}
{/if}
|