![]() |
#1 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Jan 2012
Device: kindle
|
get_browser fail to submit
Hi, I have problem on getting login from following page format
<form name="loginform" action="" onsubmit="return validform();" method="post" > ...... </form> <script language="javascript"> function validform(){ var f = document.loginform; var err = ""; var login = f.login.value; var pwd = f.password.value; if (login=="" || pwd=="") { err = err + "xxx" + "\n"; } var cookieName = "testHKEJCookie"; var cookieValue = "hkej_cookie_test"; document.cookie = cookieName + '=' + cookieValue + '; path=/'; var test_cookie = readCookie(cookieName); if (test_cookie != cookieValue) { return false; } if (err!="") { alert(err); return false; } f.action="_login_prg.jsp"; f.submit(); } I guess the problem is, it use onsubmit in the form and pass to javascript for validation then submit to another jsp. I use the standard get_browser code to set the login,password and then submit. Tracked the result and seems nothing happen. Any way to fix it, please advice. Thanks, apc |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Questions About def get_browser(self) | Finbar127 | Recipes | 6 | 02-24-2011 09:36 PM |
Can get_browser (login, password) be used to get the RSS XML? | spedinfargo | Recipes | 1 | 02-03-2011 09:55 PM |
Where to submit articles ? | spoudaios | Writers' Corner | 6 | 05-26-2010 08:43 PM |
Submit my articles | Shannon | Lounge | 3 | 01-08-2009 12:56 PM |