title: Uncaught ReferenceError: sendcard is not defined
body: <p>Ok so i keep getting this error but have no idea why... And yes i have checked other similar posts but nothing helped. Here is the error:</p>
  
  <pre><code>Uncaught ReferenceError: sendcard is not defined
  onclick @ kikcards.html:102      
  </code></pre>
  
  <p>which is:</p>
  
  <pre><code>&lt;tr&gt;&lt;td colspan=2 align=center&gt;&lt;img src="/Images/generate.png" width=150 onclick="sendcard()"&gt;&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
  <p>All the code i have:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;title&gt;Kik Cards | Crazii&lt;/title&gt;
  
      &lt;link rel="stylesheet" type="text/css" href="/-default.css"/&gt;
      &lt;link href='https://fonts.googleapis.com/css?family=Permanent+Marker' rel='stylesheet' type='text/css'&gt;
      &lt;meta charset = "utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"&gt;&lt;/script&gt;
      &lt;link id="kikicon" rel="kik-icon" href="kik.png"/&gt;
      &lt;script src="/navOpen.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdn.kik.com/kik/2.0.5/kik.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body class="body"&gt;
  
      &lt;nav id="mainNav"&gt;
        &lt;div id="logo"&gt;
          &lt;a href="/index.html"&gt;&lt;span&gt;C&lt;/span&gt;razii&lt;span&gt; &lt;/span&gt; &lt;/a&gt;
        &lt;/div&gt;
        &lt;div id="mobileToggle"&gt;
          &lt;div class="bar"&gt;&lt;/div&gt;
          &lt;div class="bar"&gt;&lt;/div&gt;
          &lt;div class="bar"&gt;&lt;/div&gt;
        &lt;/div&gt;
        &lt;ul id="mainMenu"&gt;
          &lt;li&gt;
            &lt;a href="/index.html"&gt;Home&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="/about.html"&gt;About&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="#"&gt;PS3 Modding&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="/ebooks/ebooks.html"&gt;PDFs&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a href="/kikcards.html"&gt;Kik Cards&lt;/a&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/nav&gt;
  
      &lt;div class="mainContent"&gt;
          &lt;div class="content"&gt;
              &lt;article class="Content1"&gt;
                  &lt;header&gt;
                      &lt;h2&gt;&lt;a href="#" title="1st Post"&gt; Kik Cards&lt;/a&gt;&lt;/h2&gt;
                  &lt;/header&gt;
                  &lt;footer&gt;
                      &lt;p class="post-info"&gt; &lt;br&gt; &lt;/p&gt;
  
                  &lt;/footer&gt;
                  &lt;content&gt;
                      &lt;p&gt;
                          &lt;table&gt;
                              &lt;tr&gt;&lt;td style="text-align:right"&gt;Title:&lt;/td&gt;&lt;td&gt;&lt;input id="title"&gt;&lt;/td&gt;&lt;/tr&gt;
                              &lt;tr&gt;&lt;td style="text-align:right"&gt;Text (optional):&lt;/td&gt;&lt;td&gt;&lt;input id="text"&gt;&lt;/td&gt;&lt;/tr&gt;
                              &lt;tr&gt;&lt;td style="text-align:right"&gt;Main Title:&lt;/td&gt;&lt;td&gt;&lt;input id="maintitle"&gt;&lt;/td&gt;&lt;/tr&gt;
                              &lt;tr&gt;&lt;td style="text-align:right"&gt;Little Icon (URL, optional):&lt;/td&gt;&lt;td&gt;&lt;input id="icon"&gt;&lt;/td&gt;&lt;/tr&gt;
                              &lt;tr&gt;&lt;td style="text-align:right"&gt;Big Picture (URL, optional):&lt;/td&gt;&lt;td&gt;&lt;input id="pic"&gt;(If nothing is entered here, the default icon will be used)&lt;/td&gt;&lt;/tr&gt;
                              &lt;tr&gt;&lt;td style="text-align:right"&gt;Redirect URL (optional):&lt;/td&gt;&lt;td&gt;&lt;input id="redirect"&gt;&lt;/td&gt;&lt;/tr&gt;
                              &lt;tr&gt;&lt;td style="text-align:right"&gt;Big picture? (hides the title)&lt;/td&gt;&lt;td&gt;&lt;input type="checkbox" id="big"&gt;&lt;/td&gt;&lt;/tr&gt; &lt;!-- document.getElementById(big).checked -&gt; bool --&gt;
                              &lt;tr&gt;&lt;td style="text-align:right"&gt;Forward-able?&lt;/td&gt;&lt;td&gt;&lt;input type="checkbox" id="forward" checked=true&gt;&lt;/td&gt;&lt;/tr&gt;
                              &lt;tr&gt;&lt;td colspan=2 align=center&gt;&lt;img src="/Images/generate.png" width=150 onclick="sendcard()"&gt;&lt;/td&gt;&lt;/tr&gt;
                          &lt;/table&gt;
                      &lt;/p&gt;
                  &lt;/content&gt;
              &lt;/article&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;footer class="mainFooter"&gt;
          &lt;p&gt; Copyright &amp;copy; 2015 &lt;a href="#" title="Crazii"&gt;&lt;b&gt;Crazii&lt;/b&gt;&lt;/p&gt;
      &lt;/footer&gt;
  
      &lt;script&gt;
      window.onload = function()
          {
              if (kik.message &amp;&amp; kik.message['url']!="") {
                      window.location.replace(kik.message['url']);
                  }
                  var title = "";
                  var maintitle = "";
                  var body = "";
                  var display = "";
                  var bigpicture = "";
                  var forwardable = "";
                  var redirect = "";
                  function precede(str, check_for) {
                      return str.slice(0, check_for.length) == check_for;
                  }
                  function sendcard() {
                      title = document.getElementById("title").value;
  
                      maintitle = document.getElementById("maintitle").value;
                      if (maintitle=="") {
                          maintitle = "Kik Cards | Crazii";
                      }
  
                      body = document.getElementById("text").value;
  
                      document.getElementById("kikicon").href = document.getElementById("icon").value;
  
                      display = document.getElementById("pic").value;
                      if (display == "") {
                          display = "http://crazii.herobo.com/Images/kik.png";
                      }
                      bigpicture = document.getElementById("big").checked;
                      if (document.getElementById("forward").checked == true) {
                          forwardable = false;
                      } else {
                          forwardable = true;
                      }
  
                      redirect = document.getElementById("redirect").value;
                      if (precede(redirect, "http://")) {
                          redirect = redirect;
                      } else if (precede(redirect, "https://")) {
                          redirect = redirect;
                      } else if (redirect == "") {
                          redirect = "http://crazii.herobo.com";
                      } else {
                          redirect = "http://"+redirect;
                      }
                      document.getElementById("webtitle").innerHTML = maintitle;
  
                      kik.send({
                      title: title,
                      text: body,
                      pic: display,
                      big: bigpicture,
                      noForward: forwardable,
                      data: {'url': redirect}
                  });
              }
          }
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;     
  </code></pre>
  
  <p>In advance i appreciate any help i can get, thanks!</p>