/    Sign up×
Community /Pin to ProfileBookmark

hi, I am using the following code.

<html>

<script>

onload = function()
{
alert (lf.innerHTML);
}
</script>

<head>

<frameset rows=”0%,*” frameborder=”1″>
<frame name=”uf” src=”http://www.google.com“>
<frame name=”lf” src=”http://www.yahoo.com“>
</frameset>
</head>

</html>

However, when i try to retrieve the source code of one of the pages all i get is undefined:mad:

i would really like this to work properly. please help

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisFeb 25.2004 — There are security protocols that prevent you from using script to get information from a different domain. You will not get any information from a page unless it is on your domain.
Copy linkTweet thisAlerts:
@leontagerauthorFeb 25.2004 — So how can i get the source of a different site into a variable?
×

Success!

Help @leontager spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...