Javascript - Form post parameters lost after user logs in -
i dynamically creating form , doing submit redirects user domain(lets redirecting mangoes.com apples.com) using javascript.
var demfrm = document.createelement('form'); document.body.appendchild(demfrm); demfrm.setattribute("action", "https://mangoes.com"); demfrm.setattribute("name", "demo"); var hiddeninput = document.createelement('input'); hiddeninput.setattribute("type", "hidden"); hiddeninput.setattribute("name", "quantity"); hiddeninput.setattribute("value", "3"); demfrm.appendchild(hiddeninput); demfrm.setattribute("method", "post"); demfrm.setattribute("target", "_blank"); demfrm.submit();
if user logged in mangoes.com website, form parameters still present. if user has login website, after login, form post parameter lost. how still have "quantity" parameter after user has finished login
save form values before login static variables , retrieve them later
.... code var tempdata = document.getelementbyname("quantity")[0].value; demfrm.submit(); document.getelementbyname("quantity")[0].value = tempdata;
Comments
Post a Comment