Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I expanded the sample to create a test and... <code>parameters</code> held the correct value. What didn't work was passing the parameters to <code>actions_dispatch2.php</code>. Try passing the parameters as the second argument to <code>load(...)</code>:</p> <pre><code> wrap.load(page_to_load, "action=" + action + parameters); </code></pre> <p>Edit: Strike that, it works both ways in my test case under Safari 4.0.3 and FF 3.5. It's worth a try, but it's probably not the solution.</p> <p>We need a complete minimal test case, as what's provided will work.</p> <p>An alternative is to do away with the "parameters" attribute, which is both non-standard and and unnecessary duplication of the data in the form inputs. Extend jQuery with a method to collect parameters:</p> <pre><code>jQuery.extend(jQuery.fn, {parameters: function(type) { type = type || ''; var params = this.children('input'+type).map(function (i) { if (this.value) { return this.name + '=' + this.value; } else { return this.name; } } ); return Array.prototype.join.call(params, '&amp;'); } }); </code></pre> <p>Then, in your onBeforeLoad handler:</p> <pre><code>var parameters = '&amp;' + this.getTrigger().closest('form').parameters(':hidden'); </code></pre> <p>You could probably leave out the ':hidden' argument. If you wish, you could alter <code>parameters</code> to additionally take multiple types (as e.g. an array of selectors) to get the parameters from multiple input types.</p> <p>As for Firebug pointers, see:</p> <ul> <li><a href="http://www.evotech.net/blog/2007/06/introduction-to-firebug/" rel="nofollow noreferrer">Introduction To Firebug</a></li> <li><a href="http://www.webmonkey.com/tutorial/Build_Better_Pages_With_Firebug" rel="nofollow noreferrer">Build Better Pages With Firebug</a></li> <li><a href="http://www.digitalmediaminute.com/screencast/firebug-js/" rel="nofollow noreferrer">Firebug screencast</a></li> </ul>
 

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