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

Content deleted Content added
No edit summary
No edit summary
Line 34:
</ul>
<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
// parseParams is defined in MediaWiki:Common.js
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