title: Using Javascript to modify elements for navigation
body: <p>JS beginner here;</p>
  
  <p>Ok, I'm trying to manipulate the functions of Codaslider for a layout. What I need is the ability to use an image for slide dynamic slide navigation.</p>
  
  <p>I've solved the issue for dynamic hashing, however I'm stuck at modifying the HTML. I've tried a few things but I figure this is the easiest way...</p>
  
  <p>This is what I've got so far;</p>
  
  <pre><code>function navigate ()
  {
      var url = document.getElementById('back');
      url.href = page_back();
      return url;
  }
  
  function page_back(inward)
  {
      new Object(inward.location.hash);
      var rehash = inward.location.hash.match(/[^#]/);
      if (rehash == 1) {
          rehash = 5;
      }
          else if(rehash == 2) {
              rehash = 1;
          }
              else if(rehash == 3) {
                  rehash = 2;
              }
                  else if(rehash == 4) {
                      rehash = 3;
                  }
                      else if(rehash == 5) {
                          rehash = 4;
                      }
                          else if(rehash == null) {
                              rehash = 5;
                          }
                              else{rehash = "Invalid URL or REFERRER"}
      inward.location.hash = rehash;
      return inward.location.href;
  };
  </code></pre>
  
  <p>Implemented here;</p>
  
  <pre><code>&lt;a href="#5" id="back" class="cross-link"&gt; &lt;input type="image" class="left_arrow" src=
          "images/leftarrow.png"  onclick="navigate()" /&gt;&lt;/a&gt;
  </code></pre>
  
  <p>What I expect this to do is change the href value to "#1" so that Codaslider will do it's thing while I provide a stationary dynamic image for slide browsing.</p>
  
  <p>Anyone have any idea what i'm doing wrong? page_back works fine but navigate seems to be useless.</p>