<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1012850" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1012850</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-includes#comment-1074705</link>
    <description> &lt;p&gt;Thanks fore that great answer Vincent &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt; it was really informative, i think im going to buy me a book to learn some more.&lt;/p&gt;
&lt;p&gt;Thanks again&lt;/p&gt;
&lt;p&gt;Magnus&lt;/p&gt;
 </description>
     <pubDate>Sun, 26 Nov 2000 17:42:14 +0000</pubDate>
 <dc:creator>MagB</dc:creator>
 <guid isPermaLink="false">comment 1074705 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-includes#comment-1074638</link>
    <description> &lt;p&gt;Hi MagB &amp;amp; as Max said: welcome to the forum that likes to spin webs round the masters &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;  Re your question: js files should work for 3.0 browsers since the &#039;include&#039; statement is really an HTML thingy, not a javascript one.&lt;/p&gt;
&lt;p&gt;  Re your original post &amp;amp; js files in general:&lt;/p&gt;
&lt;p&gt;  1) the file cannot contain any HTML. This includes HTML comment tags &quot;&quot;  If you want to comment the file (and you should if it&#039;s long) you must use c-like comments:&lt;/p&gt;
&lt;p&gt;  a) &quot;//&quot; for one-line comments like:&lt;br /&gt;
       alert(msg); //msg is passed from blahblah&lt;br /&gt;
  b) &quot;/* comment */&quot; for multiple-line comments, like:&lt;br /&gt;
   /* this file contains five functions&lt;br /&gt;
      including one for the menu */&lt;/p&gt;
&lt;p&gt;  2) if you want to include HTML in your js file, it must be embedded within a javascript function or variable, for example:&lt;/p&gt;
&lt;p&gt;  a) document.write(&quot;&lt;img src=&#039;pic1.gif&#039; /&gt;&quot;);&lt;br /&gt;
  b) var header = &quot;My Title&quot;;&lt;/p&gt;
&lt;p&gt; Note the single quotes within  the doubles in example 2a.&lt;/p&gt;
&lt;p&gt;The script tag should be placed within the head tags, as follows:&lt;/p&gt;
&lt;p&gt;&amp;lt;script LANGUAGE=&quot;javascript&quot; SRC=&quot;menu.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;script language=&#039;javascript&#039;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;Note: in the above example, if you have a var named &#039;myTitle&#039; in the js file, it will be overwritten by the one in the normal script tags.&lt;/p&gt;
&lt;p&gt;You can then use the information in the js file as you would if it were written within the HTML page.&lt;/p&gt;
&lt;p&gt;Re your specific problem:&lt;/p&gt;
&lt;p&gt;In your js file, have the following:&lt;/p&gt;
&lt;p&gt;function myLink()&lt;br /&gt;
{&lt;br /&gt;
document.write(&#039;Click &lt;A href=&quot;http://www.URL.com&quot;&gt;here&lt;/a&gt; to visit Site.&#039;);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;in your html pages, wherever you want the link to appear, write:&lt;/p&gt;
&lt;p&gt;....text and stuff in the body......&lt;br /&gt;
&amp;lt;script language=&#039;javascript&#039;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
....more text and stuff in the body......&lt;/p&gt;
&lt;p&gt;As Hugh said, the document.write needs to be on one line. I placed in a function so that you can refer to it in the html page. &lt;/p&gt;
&lt;p&gt;If you are a javascript newbie, I recommend:&lt;br /&gt;
  1) you see the javascript primer at: &lt;a href=&quot;http://htmlgoodies.earthweb.com&quot; class=&quot;bb-url&quot;&gt;http://htmlgoodies.earthweb.com&lt;/a&gt;&lt;br /&gt;
  2) buy a book for beginners (like SAM&#039;s Javascript in 24 Hours)&lt;/p&gt;
&lt;p&gt;Vinny&lt;/p&gt;
 </description>
     <pubDate>Sat, 25 Nov 2000 01:35:48 +0000</pubDate>
 <dc:creator>Vincent Puglia</dc:creator>
 <guid isPermaLink="false">comment 1074638 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-includes#comment-1074519</link>
    <description> &lt;p&gt;&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/surprise.png&quot; title=&quot;Shocked&quot; alt=&quot;Shocked&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Thanks for pointing out that rather simple mistake to me Hugh &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt; I got another question will this work in all java enabled browsers, even 3.0 ones? and is there any other way you could do this on?&lt;/p&gt;
 </description>
     <pubDate>Thu, 23 Nov 2000 15:56:35 +0000</pubDate>
 <dc:creator>MagB</dc:creator>
 <guid isPermaLink="false">comment 1074519 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-includes#comment-1074486</link>
    <description> &lt;p&gt;Hey Mag, Welcome to TWF!&lt;/p&gt;
 </description>
     <pubDate>Thu, 23 Nov 2000 01:24:57 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1074486 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Put it all on 1 line</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-includes#comment-1074483</link>
    <description> &lt;p&gt;Hi Mag,&lt;br /&gt;
       put document.write(&#039;Click &lt;A href=&quot;http://www.URL.com&quot;&gt;here&lt;/a&gt; to visit&lt;br /&gt;
Site&#039;);&lt;br /&gt;
all on one line, it should work fine then.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;
        Hugh Jass&lt;/p&gt;
 </description>
     <pubDate>Thu, 23 Nov 2000 00:56:21 +0000</pubDate>
 <dc:creator>Hugh Jass</dc:creator>
 <guid isPermaLink="false">comment 1074483 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
