Template:2011FR/Form-section-links: Difference between revisions

From Donate
Jump to navigation Jump to search
Content deleted Content added
No edit summary
No edit summary
Line 34: Line 34:
</ul>
</ul>
<script type="text/javascript">
<script type="text/javascript">
function parseParams(url) {
// helper function to get querystring parameters as a JS object, nicked from WP popups gadget
var ret={};
if (url.indexOf('?')===-1) { return ret; }
var s=url.split('?').slice(1).join();
var t=s.split('&');
for (var i=0; i<t.length; ++i) {
var z=t[i].split('=');
z.push(null);
ret[z[0]]=z[1];
}
return ret;
}

// This piece of script is add to preserve the layout of the page when the user is sent to monthly donation page
// This piece of script is add to preserve the layout of the page when the user is sent to monthly donation page
// parseParams is defined in MediaWiki:Common.js
var paramsIn = parseParams(window.location.href);
var paramsIn = parseParams(window.location.href);
var paramsOut = parseParams(window.location.href); // note that 'paramsOut = paramsIn' won't work, it just creates a reference to paramsIn
var paramsOut = parseParams(window.location.href); // note that 'paramsOut = paramsIn' won't work, it just creates a reference to paramsIn

Revision as of 00:02, 26 January 2012