• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to automate the login of an external website using AJAX or javascript

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi , I would like to automate the log in of an external page. Here is what I am trying to do, I have two frame top frame contains some buttons. If I click the button I want an external web page to call with page that is already logged in using the user name and password. Is it possible to get the login page on the bottom page and input the user name and pasword automatically so that it calls the logged in page( the form of the log in page ) ? how can I do that with ajax ? is there any good ajax self help page when I can get tutorial for AJAX
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JavaScript has a same domain policy. It is impossible for it to interact with another domain.

Would you want a site to log into your bank account and make some transactions? Bye Bye money!

Eric
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What you are possibly looking for is Single Sign-On. Is the external website one of yours or a completely unrelated one?
 
T Zaman
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Sturrock wrote:What you are possibly looking for is Single Sign-On. Is the external website one of yours or a completely unrelated one?



yes Paul, I am trying to do something like that. What approach should I take? what would be the best approach. Please provide some suggestions.thanks
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First thing I would do if I were you would be: http://www.google.com/search?q=Single+Sign+on+Java

Eric
 
T Zaman
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Eric Pascarello wrote:First thing I would do if I were you would be: http://www.google.com/search?q=Single+Sign+on+Java

Eric



thanks a lot . But can I not do something like that with Ajax? if so is there any Ajax tutorial that I can use to learn Ajax.
 
Rancher
Posts: 377
Android Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,

There are loads of ajax tutorials, again a google search will reveal all.

Sean
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As I already stated, you CAN NOT talk to another domain with Ajax or JavaScript. There is security measures in place to protect you.

Eric
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Trying to do something like this from the client is nothing short of madness.

SSO is a well-known concept. Search for ways to implement it properly.
 
reply
    Bookmark Topic Watch Topic
  • New Topic