Monday, 15 March 2010

java - Trigger javascript from android app -


I'm very new to Android development, one of the app's button sends the user to a webpage, where the user has a specific system Can enter in

The webpage contains a text box for the username and password. Once you click on the login button (in the webpage), it starts a javascript to log into the system. Code is triggered: onclick = "updateAction ('TourAccLogin'); document.main_form.submit ();

Webpage form to login: < P> webpage form to login

My question is: < I have a username and password in the app, I want to know that I can manipulate this form anyhow, can I sign in automatically without user intervention? I mean, I will fill in the username and password, I On the login button, we will immediately be directed to the system without entering the username and password.

The technique has worked for me. In my case, I am loading the named field in the MLEIDIDID with a string value stored in some data, then fires its changing event, which was not itself. Javascript command slots in a single injection Track. I'm sure it will be a job for you.

I also aped a single quotes to prevent a javascript error. You may need to avoid any other special characters, including semicolons, in my case it was not necessary because the data had already been purified.

  // element copy mWebView.loadUrl ("javascript: (function () {" + "document.getElementById ('+ MlementId +') .value = '' + someData ("", "", "" "+" '; "+" Document.getElementById (' + + + + + + + '') .change (); "+"}) () ");    

No comments:

Post a Comment