<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1028661" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1028661</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-locationreplace#comment-1168541</link>
    <description> &lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;location.href = &amp;quot;page.html&amp;quot;;&lt;/code&gt;&lt;/div&gt;&#039; That works right so i figured it would be the same.&lt;/p&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: &lt;code&gt;&amp;lt;a href=&amp;quot;#&amp;quot; onclick=&amp;quot;doMove();&amp;quot;&amp;gt;Hey&amp;lt;/a&amp;gt;&lt;/code&gt;&#039;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This would be more efficent...&lt;br /&gt;
&lt;code&gt;&amp;lt;a href=&amp;quot;javascript:doMove();&amp;quot;&amp;gt;Hey&amp;lt;/a&amp;gt;&lt;/code&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Mar 2005 23:55:45 +0000</pubDate>
 <dc:creator>bja888</dc:creator>
 <guid isPermaLink="false">comment 1168541 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-locationreplace#comment-1168531</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;bja888 wrote:&lt;/strong&gt; &lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;location.replace = &amp;quot;http://www.yahoo.com&amp;quot;;&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
No need to thank me.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Sorry to break it to ya champ but that doesn&#039;t work. His original code is correct.&lt;/p&gt;
&lt;p&gt;I researched the problem and I think the issue is that you are using the onclick event handler on a  tag. Try this and make sure that index2.html actually exists.  Otherwise the script will do nothing.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;Yo&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;amp;gt;&lt;br /&gt;function doMove() {&lt;br /&gt;	location.replace(&amp;quot;index2.html&amp;quot;);&lt;br /&gt;}&lt;br /&gt;&amp;amp;lt;/script&amp;amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;a href=&amp;quot;#&amp;quot; onclick=&amp;quot;doMove();&amp;quot;&amp;gt;Hey&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;-dk&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Mar 2005 19:55:08 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1168531 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-locationreplace#comment-1168523</link>
    <description> &lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;location.replace = &amp;quot;http://www.yahoo.com&amp;quot;;&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
No need to thank me.&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Mar 2005 18:09:18 +0000</pubDate>
 <dc:creator>bja888</dc:creator>
 <guid isPermaLink="false">comment 1168523 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-locationreplace#comment-1168521</link>
    <description> &lt;p&gt;that makes sense.  Thank you&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Mar 2005 17:33:30 +0000</pubDate>
 <dc:creator>artsapimp</dc:creator>
 <guid isPermaLink="false">comment 1168521 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-locationreplace#comment-1168518</link>
    <description> &lt;p&gt;This is because location.replace only works onload.  Its like using a header(&quot;Location: http://yadayada.com&quot;); in PHP.  You can&#039;t change the headers after the page has been displayed.&lt;/p&gt;
&lt;p&gt;-dk&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Mar 2005 16:52:23 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1168518 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
