javascript - JS POST request via form.submit() differs from click one -


i need submit post method form using javascript, form:

<form action="" method="post">   <p>     <input class="button white bigwidth" type="submit" name="imgcontinue" value="continue image ... ">   </p> </form> 

and how try send via js:

var form = document.getelementsbytagname("form"); if(form.length != 0) {   form[0].submit(); } 

but doesn't work same way clicking on button (i checked there jquery click handlers attached)

test page: http://imgmoney.com/img-515f13c1bb27c.html

any suggestions how automaticly send form same way user mouse click it?

request via form.submit()

post http://imgmoney.com/img-515f13c1bb27c.html http/1.1 host: imgmoney.com connection: keep-alive content-length: 0 cache-control: max-age=0 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 origin: http://imgmoney.com user-agent: mozilla/5.0 (windows nt 6.1) applewebkit/537.36 (khtml, gecko) chrome/28.0.1500.72 safari/537.36 content-type: application/x-www-form-urlencoded referer: http://imgmoney.com/img-515f13c1bb27c.html accept-encoding: gzip,deflate,sdch accept-language: ru-ru,ru;q=0.8,en-us;q=0.6,en;q=0.4 cookie: phpsessid=b9ef96omfovrk66op827t1sim3; hstcfa2204047=1374076305244; hstcmu2204047=1374076305244; cls_weather=low%7bundefined%7dhigh%7bundefined%7dicon%7bundefined%7dcondition%7bundefined%7dbase%7bhttp%3a//www.google.com%7dsug_unit%7bc%7dcity%7bsaint%20petersburg%7dcountry%7bru%7d; __atuvc=2%7c29; noadvtday=0; ao_s=7; hstcla2204047=1374076527809; hstpn2204047=7; hstpt2204047=7; hstcnv2204047=1; hstcns2204047=1; mlrv_72204047=1374076528372; mlr72204047=1374076518000; __utma=24314786.908711371.1374076306.1374076306.1374076306.1; __utmb=24314786.7.10.1374076306; __utmc=24314786; __utmz=24314786.1374076306.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none) 

and via mouse click user

post http://imgmoney.com/img-515f13c1bb27c.html http/1.1 host: imgmoney.com connection: keep-alive content-length: 34 cache-control: max-age=0 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 origin: http://imgmoney.com user-agent: mozilla/5.0 (windows nt 6.1) applewebkit/537.36 (khtml, gecko) chrome/28.0.1500.72 safari/537.36 content-type: application/x-www-form-urlencoded referer: http://imgmoney.com/img-515f13c1bb27c.html accept-encoding: gzip,deflate,sdch accept-language: ru-ru,ru;q=0.8,en-us;q=0.6,en;q=0.4 cookie: phpsessid=b9ef96omfovrk66op827t1sim3; hstcfa2204047=1374076305244; hstcmu2204047=1374076305244; cls_weather=low%7bundefined%7dhigh%7bundefined%7dicon%7bundefined%7dcondition%7bundefined%7dbase%7bhttp%3a//www.google.com%7dsug_unit%7bc%7dcity%7bsaint%20petersburg%7dcountry%7bru%7d; __atuvc=2%7c29; noadvtday=0; ao_s=8; hstcla2204047=1374076561596; hstpn2204047=8; hstpt2204047=8; hstcnv2204047=1; hstcns2204047=1; __utma=24314786.908711371.1374076306.1374076306.1374076306.1; __utmb=24314786.8.10.1374076306; __utmc=24314786; __utmz=24314786.1374076306.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); mlrv_72204047=1374076562369; mlr72204047=1374076555000  imgcontinue=continue+to+image+...+ 

and need last request above via js, suggestions?


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -