6 Replies Latest reply on Feb 27, 2014 7:25 AM by 29473

    Different behavior when using window.location on IE ,FireFox and Chrome by passing URL string as a Token

      Hi,

      I'm trying to create a landing page
       - that moves automatically to another URL in JavaScript code
       - the URL is passed as a TOKEN( I created a new custom field ,named it "Recommended URL" and trying to use as a token.
       
      So I added a HTML component on the landing page and wrote Javascript code as below.

      <script type="text/javascript" src="/js/public/jquery-latest.min.js"></script>
      <script type="text/javascript">
        var $jQ = jQuery.noConflict();

        $jQ(document).ready(function(){

          window.location = "{{lead.Recommended Url:default=http://DEFAULT.co.jp}}";

        });
       
      </script>

      The results are as follows:

      On Internet Explorer 11 
       ->It works well.
      When "Recommended URL" filed is empty,it goes to default web page.
      And When not empty,it goes to the web page that specified in "Redommended URL".

      On FireFox 27.0.1 and Chrome 33.0 → It doesn't work. "404 Page Not Found" page is shown.

      I wonder what  the cause of this different behavior between on IE and FireFox,Chrome is,
      and how I can do what I wanted to do.

      Could anyone help me with this?

      Thanks,