title: Jquery : To redirect from one page to another page
body: <p>I have two js pages(Source.js and Target.js) at two different location, now all i want to do is when user clicks on dropdown list of source page , it redirects  user to target page and vice-versa. I am providing you the exact coding with all location and everthing, i just want to know how to switch from one page to second page.</p>
  
  <p>Source.js coding</p>
  
  <pre><code>var SourceSc = function() {
  var that = {};
  var _view = null;
  var _childPanel = "#content";
  var _sourceDlgMgrC = null;
  var BEGIN = "BEGIN";
  var STARTING = "STARTING";
  var END = "END";
  var TARGET = "TARGET";  
  var _state = BEGIN;
  that.create = function(parent, panel) {
  
      _parent = parent;
      _panel = panel;
      _transition(STARTING);
  };
  that.destroy = function() {
      _transition(END);
  };
  that.eventTargetLanguageView = function() {
      _transition(TARGET_LANGUAGE_VIEW);
  };
  var _transition = function(newState) {
      _state = newState;
      switch(_state) {                
          case STARTING: _enterStarting(); break;
              case TARGET: _enterTargetDlg(); break;
          case END: _enterEnd(); break;
      }
  };
  var _enterStarting = function() {
      modelMgr.loadInclude('code/app/sc/LoggedIn/sc/Source/c/SourceDlgMgrC.js', function() {
          modelMgr.getHTML('code/app/sc/LoggedIn/sc/Source/Source.html', function(html) {
              _sourceDlgMgrC = SourceDlgMgrC();
              _sourceDlgMgrC.create(_childPanel);
              var req = {};
              var fnSuccess = function(res) {
                  _view = SourceV();
                  _view.create(that, _panel, html, res);                  
              };              
          });
      });
  };  
  var _enterTargetDlg = function() 
  {
  //now what i have to write here, to load target page
  };
  var _enterEnd = function() {
       //coding of destroy    
  };  
  return that;};
  var SourceV = function() {
  var that = {};
  
  var _sc = null;
  var _panel = null;
  
  that.create = function(sc, panel, html, res) {
      _sc = sc;
      _panel = panel;
      that.layoutUi(html);
      that.bindEvents();  
  };  
  that.layoutUi = function(html) {
  
      $(_panel).html(html);       
  };
  that.bindEvents = function() {
  
      $('#viewList').change(_sc.eventTargetLanguageView);
  };
  that.destroy = function() {
      $(_panel).html('');
      _panel = null;
      _sc = null;
  };
  return that; };
  </code></pre>
  
  <p>i can post source.html full coding but i guess that'll be use less so i'll post only the dropdown list coding</p>
  
  <pre><code>    &lt;select id = "viewList" class="fl width160"&gt;
              &lt;option&gt;Source&lt;/option&gt;
              &lt;option&gt;Target&lt;/option&gt;
          &lt;/select&gt;
  </code></pre>
  
  <p>now coding of target page is also exact same but location of Target.js is "code/app/sc/LoggedIn/sc/Target/Target.js"</p>