Forum Moderators: open

Message Too Old, No Replies

logging in onto Linkedin in iFrame using js

         

merijnvw

10:46 pm on Nov 15, 2010 (gmt 0)

10+ Year Member



Filling in an input field in an iFrame works using this script and another sample form html page I made for testing. But when I then try to do in on LinkedIn (where it is meant for) it's blocked or something, at least it doesn't fill in the field. Does someone know what causes this and how I can solve it? thanks


<html>
<head>
<script type="text/javascript">
function login(){
top.linkedin.document.getElementById('session_key-login').value="EMAIL ADDRESS";
}
</script>
</head>
<body>
<object id="linkedin" name="linkedin" data="http://www.linkedin.com/groups?mostPopular=&gid=3530727" onload="login();">
</object>
</body>
</html>

Fotiman

2:22 pm on Nov 16, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



With your sample form page, I bet it was served from the same domain. The problem is that you're running into cross domain security restrictions in the browser. The page served from one domain can not script to the page served from a different domain.

merijnvw

9:11 pm on Nov 16, 2010 (gmt 0)

10+ Year Member



Is there another way then how I can log in?

Let me explain what I want to do with it.
My goal is to get the posts in a Linkedin group. But Linkedin API doesn't support groups.
So I want to load the group page html and strip the posts out of it on my own. But first I have to login to see the posts.
My plan was to do that in an iframe, submit, and then get the html data from the iframe.

merijnvw

8:20 pm on Nov 18, 2010 (gmt 0)

10+ Year Member



solved