Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8511313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:57:21+00:00 2026-06-11T03:57:21+00:00

i got the username and password using javascript, but the code wont work for

  • 0

i got the username and password using javascript, but the code wont work for all sites. gmail uses a different id’s than face books, and many sites probably do also, so how can make the code work for any site logging in?

heres how it gets the username/password now:

if (navigationType == UIWebViewNavigationTypeFormSubmitted) {
    //works for gmail
    NSString *username = [WebView stringByEvaluatingJavaScriptFromString:@"document.getElementsByName('Email')[0].value"];
    NSString *password = [WebView stringByEvaluatingJavaScriptFromString:@"document.getElementsByName('Passwd')[0].value"];

    //works for facebook?
    //NSString *username = [WebView stringByEvaluatingJavaScriptFromString:@"document.getElementsByName('email')[0].value"];
    //NSString *password = [WebView stringByEvaluatingJavaScriptFromString:@"document.getElementsByName('pass')[0].value"];
    NSLog(@"username is %@\npassword is %@",username,password);
}

so i just want to know how to get the username and password for any site the user logs into so i can make it save, and then auto-fill when they go back and it is logged out so its an easy login.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:57:23+00:00Added an answer on June 11, 2026 at 3:57 am

    To Get all text fields you can place a js query like this

    document.querySelectorAll("input[type='text']")
    

    Hope this help. 🙂

    Also to get more details, refer this post

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In asp.net web page got username, password, emailid from login page using session. In
I got this far: :~ curl -u username:password -d status=new_status http://twitter.com/statuses/update.xml Now, how can
I've got a problem in an Oracle function execution. I've a table loginfo(username,password,type) and
I'm new to using CURL, but I have successfully got it to submit ordinary
iv got a really simple javascript question. Ill be using query for parts of
I am using the following JQuery\JavaScript code to communicate with a WCF 4 REST
I've got a site that is using javascript to resize images to a max
I'm developing a web using subversion as version control, but got working directory locked
I have written a powershell script to update username and password of apppool using
I have this quick question, i have got the username variable from a form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.