Important Update: Community URLs redirect issues are partially resolved. Learn More. .
2020-03-05 11:51 PM
Hi guys,
what could be wrong in below code. Custom code work fine on view and edit mode but does not work when click on non default tab and returning to default tab.
<html>
<body>
<script type="text/javascript">
var id = document.getElementById("master_DefaultContent_rts_tsxxxx_sxxxx_fxxxxxc").innerHTML;
</script>
<div >          Related ID :
<a class="ContentURL" href="javascript:$pbC(id+'|xxx|xx|xxxxx|')" contentid="id">
<script>
document.write(id);
</script></a>
</div>
</body>
</html>
2020-03-06 07:36 AM
When switching the tab, the elements on the previous tab are kinda "destroyed" for JQuery point of view.
1. You need top place your custom object out of ANY tab.
2. Use Sys.Application.add_load(function(){ ... }); to execute your code, if you need it to work per load/reload.
3. Put element you are accessing in the code out of the tab.