Login to site with Windows Phone WebBrowser

rey2k9

New Member
I'm trying to login to a site using Windows Phone \[code\]WebBrowser\[/code\].\[code\]<form id="loginform" method="post" action="viaJavascript" onsubmit="formSubmit(); return false;"> <h2>Password</h2> <p> <input type="hidden" name="user" maxlength="8" /> <input type="password" name="pwd" maxlength="29" /> <input type="hidden" name="from" value="http://stackoverflow.com/adminweb/jsp/timetables/timetablesController.jsp" /> <input type="hidden" name="query" value="" /> </p>\[/code\]This is the JavaScript function: \[code\]function formSubmit(){var loginform1 = document.getElementById('loginform1');var loginform = document.getElementById('loginform');loginform.user.value = http://stackoverflow.com/questions/8247949/loginform1.user.value;loginform.action ="/adminweb/servlet/login";loginform.submit();}\[/code\]I did this successfully in a \[code\]Windows.Form\[/code\] using:\[code\]webBrowser1.Document.GetElementById("user").SetAttribute("value", Store_Login.Get_Username());\[/code\]I know how to invoke the \[code\]OnSubmit()\[/code\] using \[code\]InvokeScript\[/code\], but how do I set the values \[code\]user\[/code\] and \[code\]pwd\[/code\]?
 
Top