added coerceToString sot hat hogan functions properly

This commit is contained in:
cktricky
2014-05-26 13:51:20 -04:00
parent 116c359622
commit 1594255251
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -53,6 +53,10 @@ $("pre.javascript").snippet("javascript",{style:"rand01",transparent:true,showNu
}; };
function coerceToString(val) {
return String((val === null || val === undefined) ? '' : val);
}
var rAmp = /&/g, var rAmp = /&/g,
rLt = /</g, rLt = /</g,
rGt = />/g, rGt = />/g,
+1
View File
@@ -10,6 +10,7 @@
var paramValue = hashParam.split('=')[1]; var paramValue = hashParam.split('=')[1];
document.write("<OPTION value=3>" + paramValue + "</OPTION>"); document.write("<OPTION value=3>" + paramValue + "</OPTION>");
} catch(err) { } catch(err) {
alert(err);
} }
//document.write("</select>"); //document.write("</select>");
</script> </script>