Monday, 13 July 2015

identifying textfields in UIWebView


hi guys, have uiwebview acts internet browser , loads html of webpages at.

in webviewcontroller, method webviewdidfinishload, have loaded html webpage when webpage finish loading on uiwebview.

html sieve out textfields facilitate auto population of textfield values stored in database.

methods that? method should able work on websites.
 

i try
code:
document.getelementsbyid('id_name').value
but id method not going work me need universal method identify textfields on websites(all websites uses different id names)

in login page there 2 text fields tried using

code:
document.getelementsbytagname('input')[0].value  document.getelementsbytagname('input')[1].value 
to input in values no magic.

have tried other position in array. username , password facebook [3] and[4] whereas amazon [11] , [14]. position of fields using above method kinda random. other suggestion work website?

seems me of websites have consistently set tabindex="1" username , tabindex="2" password. instance in webpage facebook:
code:
<input type="text" class="inputtext" name="email" id="email" value="" tabindex="1" />  <input type="password" class="inputtext" name="pass" id="pass" tabindex="2" />  
amazon:
code:
<input id="ap_email" name="email" value="" type="email" size="30" maxlength="128" tabindex="1" autocorrect="off" autocapitalize="off" />  <input id="ap_password" name="password" type="password" maxlength="1024" size="20"  tabindex="2" onkeypress="displaycapswarning(event,'ap_caps_warning', this);" class="password"/>  
dbs bank:
code:
<input type="text" tabindex="1" maxlength="20" size="32" name="uid" id="uid">  <input type="password" onkeyup="keyup(event)" onkeydown="return onlynumerics(event)" tabindex="2" maxlength="9" size="32" name="pin" id="pin" autocomplete="off">  
didn't see tabindex in google:
code:
<input type="text" spellcheck="false" name="email" id="email" value="">  <input type="password" name="passwd" id="passwd">  
.

suggestion?
 


Forums iPhone, iPad, and iPod Touch iOS Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

No comments:

Post a Comment