Item is new.
Item is new. Call me anytime.
<?php foreach ( $form->formVars as $var ) : ?>
jQuery('#confirm_<?php echo $var;?>').html('<?php echo strToJs($data[$var]);?>');
<?php endforeach; ?>
jQuery('#confirm_cat').html('<?php echo strToJs($cat_name); ?>');
<?php
}
/**
* @param string to sanitize for javascript
* @return string with no linebreaks / carraige returns
*/
function strToJs( $value ) {
$value = htmlentities( str_replace('\r\n', ' ', $value) );
$value = str_replace(chr(13), ' ', $value);
$value = str_replace(chr(10), ' ', $value);
return $value;
}
?>
There are currently 2 users browsing this thread. (0 members and 2 guests)