Can someone tell me how to get this line to work?
document.write (" <input type='button' value='Make this your home
page' onclick='this.style.behavior="url(#default#homepag e)";
this.setHomePage("http://www.somewhere.com");' />");
Seems no matter what I try, it either throws an error (expected ')'), or
just does nothing. It would seem that escaping is not the answer in this
case (it didn't work).
I only want this button to show if the browser is IE 5+ for obvious
reasons.
The entire script:
<script type="text/javascript">
if (navigator.appName == "Microsoft Internet Explorer" &&
navigator.appVersion >= "5.0") {
document.write ("<form>");
document.write (" <div align='center'>");
document.write (" <input type='button' value='Make this your home
page' onclick='this.style.behavior="url(#default#homepag e)";
this.setHomePage("http://www.somewhere.com");' />");
document.write (" </div>");
document.write ("</form>");
}
</script>
Thanks.
-- Don