title: php variable in jquery appended form
body: <p>i am having trouble geting a php variable that is available on the page inside a form that i am appending through a bookmarklet</p>
  
  <p>bookmarklet code:</p>
  
  <pre><code>&lt;a class="bookmarklet" href="javascript:(function(){var%20script=document.createElement('script');script.src='http://webcreationcentre.com.au/manage/manage.js';document.body.appendChild(script);})()"&gt;title checker&lt;/a&gt;
  </code></pre>
  
  <p>manage.js code:</p>
  
  <pre><code>(function(){
  
  // the minimum version of jQuery we want
  var v = "1.3.2";
  
  // check prior inclusion and version
  if (window.jQuery === undefined || window.jQuery.fn.jquery &lt; v) {
      var done = false;
      var script = document.createElement("script");
      script.src = "http://ajax.googleapis.com/ajax/libs/jquery/" + v + "/jquery.min.js";
      script.onload = script.onreadystatechange = function(){
          if (!done &amp;&amp; (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) {
              done = true;
              initMyBookmarklet();
          }
      };
      document.getElementsByTagName("head")[0].appendChild(script);
  } else {
      initMyBookmarklet();
  }
  
  function initMyBookmarklet() {
      (window.myBookmarklet = function() {
  
      var title = '&lt;?php echo $data-&gt;title; ?&gt;';
      alert(title);
  
      $('body').append($('&lt;div&gt;&lt;/div&gt;').css('width','100%')
          .append($('&lt;form&gt;&lt;/form&gt;')
          .append($('&lt;label for="title"&gt;Title&lt;/label&gt;'))
          .append($('&lt;input type="text" name="title" value="&lt;?php echo $data-&gt;title; ?&gt;"&gt;'))));
          // your JavaScript code goes here!
      })();
  }
  
  })();
  </code></pre>