Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
T Zaman
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • 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
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • 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
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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
  • 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
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Sean Clark
Rancher
Posts: 377
Android Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

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

Sean
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64692
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic