Set initial value on page load will not work, body tag is removed when template applied
I saw a similar a similar post on this and took a shot at correcting myself. While the page did load without errors, it did not go as hoped because the drop downs began appearing strange in that the child table listed country.state (parent.child) values and the initial values were not set. The similar post is in form http://www.webassist.com/forums/posts.php?id=23370
On an edit customer profile page, I am trying to populate list from array and set it to the initial value of customer's country and state from record set when the page loads. This was working fine until I applied a template to the page and the code applied to the body tag was removed. The post above recommended moving the code to the last "<!-- InstanceEndEditable -->" of template entry in source code. The code from before the template was applied read:
<body onload="WA_setSelectionsInChildList(MM_findObj('User_Update_group_11_Country'),<?php echo $row_SecurityAssistusers['UserCountry']; ?>);WA_FilterAndPopulateSubList(rsStateList_WAJA,MM_findObj('User_Update_group_11_Country'),MM_findObj('User_Update_group_State'),0,0,false,': ');WA_setSelectionsInChildList(MM_findObj('User_Update_group_State'),<?php echo $row_SecurityAssistusers['UserState']; ?>)">
This is what I applied:
<script language="language="javascript"">?WA_setSelectionsInChildList(MM_findObj('User_Update_group_11_Country'),<?php echo $row_SecurityAssistusers['UserCountry']; ?>);
WA_FilterAndPopulateSubList(rsStateList_WAJA,MM_findObj('User_Update_group_11_Country'),MM_findObj('User_Update_group_State'),0,0,false,': ');WA_setSelectionsInChildList(MM_findObj('User_Update_group_State'),<?php echo $row_SecurityAssistusers['UserState']; ?>) </script>
<!-- InstanceEndEditable -->
On a secondary note, a few years ago, I saw a Jason B entry that said you can temporarily disable the lock of the template, make your modifications, and then return the template lock entry to it's original state. If this is still possible, can you send those instructions again, I can not find the post. If this is possible, will future changes to the template going to remove the body tag edits when the change is applied?
Any assistance is appreciated,