Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Could you just serialize the fields inside <code>Form1</code>?</p> <p>I don't know anything about ASP, but it seems that you're not doing a straightforward "submit" anyway - so does it really matter if the fields aren't within their own separate form?</p> <p>You could possibly group the fields you're interested in within a <code>&lt;div&gt;</code> or something, e.g.:</p> <pre><code>&lt;div id="my-interesting-fields"&gt; ... &lt;/div&gt; </code></pre> <p>then substitute <code>#form-inside</code> with <code>#my-interesting-fields</code> where appropriate - is that helpful at all?</p> <h3>Edit</h3> <p>OK, a quick glance at the jQuery code suggests that <code>serialize()</code> depends on the form's <code>elements</code> member.</p> <p>I suppose you could hack this in a couple of different ways:</p> <ul> <li><p>Copy all elements from <code>#my-interesting-fields</code> into a temporary <code>&lt;form&gt;</code> that you dynamically create outside <code>Form1</code>, then call <code>serialize()</code> on that. Something like:</p> <pre><code>$("#Form1").after("&lt;form id='tmp-form'&gt;&lt;/form&gt;"). append("#my-interesting-fields input"); $("tmp-form").serialize(); </code></pre></li> <li><p>Or, create an <code>elements</code> member on <code>#my-interesting-fields</code>, e.g.</p> <pre><code>$("#my-interesting-fields").elements = $("#my-interesting-fields input"); $("#my-interesting-fields").serialize(); </code></pre></li> </ul> <p>I haven't tried either of these, but that might give you a couple of ideas. Not that I would necessarily recommend either of them :)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload