We use the following webresource in a form, but some Things in crm2016 u1 are not working anymore.
But how to get it working now?
The following line brings back "undefined".
var tmp_vsm = $('#shippingmethodcode', window.parent.document).attr('data-raw');
<html>
<head>
<meta charset="utf-8">
<link href="/WebResources/new_button_css" rel="stylesheet" type="text/css">
<script type="text/javascript">
var tmp_vsm = $('#shippingmethodcode', window.parent.document).attr('data-raw');
var OS_d = "2";
var URL_d = 'https://xxx.de/exec.do?idc=' + tmp_snr;
var LOGO_d = "new_logo_d";
var OS_d = "14";
var URL_d = 'https://xxx.de/exec.do?query=' + tmp_snr;
var LOGO_d = "new_logo_d";
function check_vsm() {
if(tmp_vsm == OS_d)
{
document.write('<a href="' + URL_d + '" target="_blanc"><img alt="svf" src="' + LOGO_d + '"><br>svf</a>');
} else if(tmp_vsm == OS_d)
{
document.write('<a href="' + URL_d + '" target="_blanc"><img alt="svf" src="' + LOGO_d + '"><br>svf</a>');
}
}
function hideThings()
{
$('#svf').hide();
if (tmp_snr != null && tmp_snr != '' && tmp_snr != '--') $('#svf').show();
}
</script>
</head>
<body>
<table class="buttons">
<tbody>
<tr>
<td><p align="center" id="svf"><script>check_vsm();</script></p></td>
<td><p> </p></td>
<td><p> </p></td>
<td><p> </p></td>
</tr>
</tbody>
</table>
<script>hideThings();</script>
</body>
</html>
any ideas?
thx
greets PeB