Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 11th, 2011, 03:47 AM
quergroup quergroup is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2011
Posts: 3 quergroup User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 11 sec
Reputation Power: 0
Flash Player 10 - Login to 3rd party site (was Iframe Passthrame)

I would appreaciate if you could give me a hand in this javascript in the codebehind of a C# asp.net page. What I want to do is have a button, which when pressed will do the following:

1. create a frame or iframe or something like that

2. go to page within that frame

3. login to that page by focusing on specific form elements and then submiting the form

4. Redirect to that logged in page

Here is what I have managed until now:

Code:
<iframe id="logonframe" src="https://.com" style="width: 100%; height: 200px; border:none;"></iframe>

              <script language=Javascript>
                  function paybutton() 
              {
                      document.domain = "https://.com";
                      var oIframe = document.getElementById("logonframe");
                      var oDoc = oIframe.contentWindow || oIframe.contentDocument;
                      if (oDoc.document) {
                          oDoc = oDoc.document;
                      }
                      oDoc.getElementById("logonButton").click();
                      oDoc.parent.login.logonForm.f_username.value = 'xxxl@quer.co.uk';
                      oDoc.parent.login.logonForm.f_passwd.value = 'zzz';
                      oDoc.parent.login.logonForm.submit();
                      return true; 
              }
               </script>

              <input type="button" value="my javascript" onclick="javascript:paybutton()" style="float:left;" />

Reply With Quote
  #2  
Old October 11th, 2011, 07:26 AM
E-Oreo's Avatar
E-Oreo E-Oreo is offline
Lost in code
Click here for more information.
 
Join Date: Dec 2004
Posts: 7,931 E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)  Folding Points: 945 Folding Title: Novice Folder
Time spent in forums: 2 Months 7 h 43 m 47 sec
Reputation Power: 7053
Browsers won't allow you to manipulate the contents of a frame unless it is on the same domain as the parent page.
__________________
PHP FAQ
How to program a basic, secure login system using PHP

Quote:
Originally Posted by Spad
Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

Reply With Quote
  #3  
Old October 11th, 2011, 07:38 AM
quergroup quergroup is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2011
Posts: 3 quergroup User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 11 sec
Reputation Power: 0
Quote:
Originally Posted by E-Oreo
Browsers won't allow you to manipulate the contents of a frame unless it is on the same domain as the parent page.


Thanks for your reply. Can you suggest any other way of doing what I need to do?

Reply With Quote
  #4  
Old October 11th, 2011, 08:01 AM
E-Oreo's Avatar
E-Oreo E-Oreo is offline
Lost in code
Click here for more information.
 
Join Date: Dec 2004
Posts: 7,931 E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)  Folding Points: 945 Folding Title: Novice Folder
Time spent in forums: 2 Months 7 h 43 m 47 sec
Reputation Power: 7053
Using asp.net/JavaScript there is no way for you to log in the user on a third party site. You would need to be able to execute privileged code, like signed Java, Flash or a browser extension to be able to do something like that.

If you have some control over the third party site then you could program an API that would allow you to do this.

If the site has a "GET" form that allows the user to log in then you could use that instead. If you set the iframe URL directly to that then you'll log them in immediately.

Reply With Quote
  #5  
Old October 11th, 2011, 08:56 AM
quergroup quergroup is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2011
Posts: 3 quergroup User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 11 sec
Reputation Power: 0
Thanks, can you give me any advice on how to go about realising this in Flash? Will it be just a actionscript running in the background through an embedded swf video module - which would be the button?

Quote:
Originally Posted by E-Oreo
Using asp.net/JavaScript there is no way for you to log in the user on a third party site. You would need to be able to execute privileged code, like signed Java, Flash or a browser extension to be able to do something like that.

If you have some control over the third party site then you could program an API that would allow you to do this.

If the site has a "GET" form that allows the user to log in then you could use that instead. If you set the iframe URL directly to that then you'll log them in immediately.

Reply With Quote
  #6  
Old October 11th, 2011, 05:06 PM
E-Oreo's Avatar
E-Oreo E-Oreo is offline
Lost in code
Click here for more information.
 
Join Date: Dec 2004
Posts: 7,931 E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)  Folding Points: 945 Folding Title: Novice Folder
Time spent in forums: 2 Months 7 h 43 m 47 sec
Reputation Power: 7053
I really have no idea, I've never programmed anything in Flash. I asked a moderator to move your thread to the Flash board.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Flash Player 10 - Login to 3rd party site (was Iframe Passthrame)

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap