title: performing JavaScript action on $.post()
body: <p>Here's my JavaScript code on my "test" page.</p>
  
  <pre><code>$('#link_share_input').keyup(function () {
      var link_share_input = $(this).val();
      if (link_share_input != '') {
          $.post('http://' + window.location.hostname + '/assets/scripts/ajax_dashboard_dynamic_preview.php', {
              preview_type: 'link',
              link_share_input: link_share_input
          }, function (data) {
              if (data !== "") {
                  $('.link_preview_span').show();
                  $('.link_attachment_preview').html('&lt;div class = "center" style = "padding: 10px 0"&gt;&lt;img src = "http://www.assets.buddyweb.me/style_images/loading.gif"&gt;&lt;/div&gt;');
                  $('.link_attachment_preview').html(data);
              } else {
                  $('.link_preview_span').hide();
              }
          })
      }
  })
  
  
  $('#video_url_input').keyup(function () {
      var video_url_input = $(this).val();
      if (video_url_input != '') {
          $.post('http://' + window.location.hostname + '/assets/scripts/ajax_dashboard_dynamic_preview.php', {
              preview_type: 'video',
              video_url_input: video_url_input
          }, function (data) {
              if (data !== "") {
                  $('.link_preview_span').show();
                  $('.link_attachment_preview').html('&lt;div class = "center" style = "padding: 10px 0"&gt;&lt;img src = "http://www.assets.buddyweb.me/style_images/loading.gif"&gt;&lt;/div&gt;');
                  $('.link_attachment_preview').html(data);
              } else {
                  $('.link_preview_span').hide();
              }
          })
      }
  })
  </code></pre>
  
  <p>the <code>#link_share_input</code> and <code>#video_url_input</code> div's comes from a file which is <code>$.post</code>ed onto the page. Unless I put the above JavaScript onto the page it is <code>$.post</code>ed from it will work.</p>
  
  <p>How can I get this JavaScript to work on the data <code>$.post</code>ed from a file to the "test" file?</p>