Gudday all
Recently I was forced to change hosts for my wife’s on-line business.
On the previous host my JS for displaying date last modified worked ok. But on the new host it is not visible.
The new host calims that my code must be wrong but I do not see how as it is unchanged.
Before is the code
<script type="text/javascript">//<![CDATA[var now = new Date();document.write('<p class="webmaster">');document.write("Site design © Petals & Patches 2004 -" + now.getFullYear() + ".");document.write('<p class="lastupdated">');document.write("Last updated on " + document.lastModified.substring(3,5) + "/" + document.lastModified.substring(0,2)+ "/" + document.lastModified.substring(6,10) + '<\\/p>');//]]></script>
Is there any thing wrong with the code that might prevent it from working or displaying? Or is there some setting on the new host that needs to be changed? Or is the hoster is playing hard to get?
What I also find very puzzling is that on taht same page I have JS to detect whether a radio button has been selected or not and it workd fine.
This code is below
<script language="javascript" type="text/javascript">function checkRadio (frmName, rbGroupName){ var radios = document[frmName].elements[rbGroupName]; for (var i=0; i<radios.length;i++) { if (radios[i].checked) { return true; } } return false; }function valFrm(frmName){ if (!checkRadio(frmName, "productpr")) { var err = 'You have not selected a ' + frmName + ' quilt option. Please select an option'; alert(err); return false; } else return true;} </script>