| Forums | Email a Colleague | FAQ |
|
Dr. Website® Archives 2002June 27, 2002
Dear Dr. Website: Being new at JavaScript I often find that the html appears on my website. For instance with this script: <script language="JavaScript"> function right(e) { if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) return false; else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) { alert("Please don't steal my stuff!!!"); return false; } return true; } document.onmousedown=right; if (document.layers) window.captureEvents(Event.MOUSEDOWN); window.onmousedown=right; </script> I placed it right between the <head> and </head> section on my webpage and it showed up as html for all to see. Could you tell me where I am going wrong? I use Front Page. Answer:
<SCRIPT LANGUAGE="JavaScript">
<!--
script goes here
-->
</script>
--Dr.Website Question: - when the user mouseover some hyperlink text, a menu will appear beside the text, and the user can then click on the menu items to invoke some other script functions. - the menu must disappear by itself when the cursor leaves the hyperlink. Answer: <meta http-equiv="Page-Enter" content="RevealTrans(Duration=1.0)"> You need to put it within the HEAD tags of your web page. There are many types of transitions available, including:
Blend in You can find more info about how to use these transitions here: http://www.webdevelopersjournal.com/wacky/transitions/transitions.html --Dr.Website
Question: Answer: You would use the NAME attribute to describe the type of information and the CONTENT attribute to list the keywords themselves, as in the following example using HTML code: <META NAME="keywords" CONTENT="word1 word2">
The descriptive terms you use in the CONTENT attribute should add to, not repeat, the terms used in the <TITLE> tag.
--Dr.Website ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|