From: Lorenzo A. <l.a...@ti...> - 2006-02-20 14:29:27
|
Hi Marcus, I'm trying to test a web page with some text links that dynamically create a form [1] and submit the request via POST. It is all done with the onClick handler, and the href attribute is set to "javascript:void(0)", as you can see below. SimpleTest seems to ignore the onClick action, it only considers the href attribute... here's the Request dump: <?php $this->clickLink('a link') $this->showRequest(); ?> ================================================ GET /path/to/my/page/javascript:void(0) HTTP/1.0 Host: localhost Connection: close ================================================ obviously I get a "HTTP/1.1 403 Forbidden" error as a response. Do you know any workaround for this issue? Should I submit a bug report? TIA Best regards, -- Lorenzo Alberton http://pear.php.net/user/quipo [1] A sample link: <a href='javascript:void(0)' onClick='var form = document.createElement("form"); form.action = "mypage.php"; form.method = "POST"; document.getElementsByTagName("body")[0].appendChild(form);form.submit(); return false;'>a link</a> |