Bug #14367
closedclass.tslib_content.php function getUpdateJS produce JS error messages
0%
Description
this function forget to add a ";" after each generated javascript line so that the IE popup with a error message if you visit a page. you can reproduce this on a direct mail subscriptions page. i fixed it by change this lines:
5679: updateForm('".$formName."','".$arrPrefix."[".$fKey."][]',unescape('".rawurlencode($Nvalue)."'));";
and
5684: updateForm('".$formName."','".$arrPrefix."[".$fKey."]',unescape('".rawurlencode($value)."'));";
(issue imported from #M434)
Files
Updated by Franz Holzinger about 18 years ago
This is a bug.
I cannot attach this as a file. So it comes here. This is neeed for sr_feuser_register, too.
see http://bugs.typo3.org/view.php?id=3986
--------------------
function getUpdateJS($dataArray, $formName, $arrPrefix, $fieldList) {
$JSPart='';
$updateValues=t3lib_div::trimExplode(',',$fieldList);
while(list(,$fKey)=each($updateValues)) {
$value = $dataArray[$fKey];
if (is_array($value)) {
reset($value);
while(list(,$Nvalue)=each($value)) {
$JSPart.="
updateForm('".$formName."','".$arrPrefix."[".$fKey."][]',".t3lib_div::quoteJSvalue($Nvalue, true).");";
}
} else {
$JSPart.="
updateForm('".$formName."','".$arrPrefix."[".$fKey."]',".t3lib_div::quoteJSvalue($value, true).");";
}
}
$JSPart='<script type="text/javascript">
/*<![CDATA[*/ '.$JSPart.'
/*]]>*/
</script>
';
Updated by Thomas Hempel about 17 years ago
Wow... This is an old one.
Because the problem, still exists. I've added a patch for 4.2.
Greets,
Thomas