use jquery to build form
<p>I have an html table that pulls data from a DB.  It has an edit button:</p>

<pre><code>&lt;button id="editbutton" onClick='edit2("&lt;?php echo htmlentities($_SERVER['REQUEST_URI']); ?&gt;","&lt;?php echo $result_cameras[$i]["camera_name"]; ?&gt;", "&lt;?php echo $camera_quality; ?&gt;", "&lt;?php echo $camera_status; ?&gt;", "&lt;?php echo $email_notice; ?&gt;", "&lt;?php echo $result_cameras[$i]["camera_hash"]; ?&gt;")'&gt;Edit&lt;/button&gt;
</code></pre>

<p>I'm just passing in a number of things that I need to build the form.  So that when the edit button is clicked it will create a form in javascript:</p>

<pre><code>function edit2(to, cameraname, cameraquality, camerastatus, emailnotice, camerahash)
{
var mydiv = document.getElementById("editform");
var myForm = document.createElement("form");
myForm.method = "post";
myForm.action = to;

var label = document.createElement("label");
label.for = "text";
label.innerHTML="Camera name: ";
myForm.appendChild(label);

myInput = document.createElement("input");
myInput.setAttribute("name", "camera_name"); 
myInput.setAttribute("value", cameraname);
myForm.appendChild(myInput);    
mydiv.appendChild(myForm);
}
</code></pre>

<p>Right now this contains only the processing for cameraname just for a proof point (which works).  So now to the question.  I'm starting to add some stuff with jquery so I also have:</p>

<pre><code>var js = jQuery.noConflict();
  js(document).ready(function(){
    js('#webcamform').hide(); //initially hide form
    js("#editbutton").click(function(){
      js('#webcamform').show();//Form shows on button click
  });
});
</code></pre>

<p>I want to add more neat jquery stuff.  Keeping in mind that I can't use Ajax at this point (Joomla reasons), should I combine this?  All in jquery?  How?  Thanks in advance. </p>
