🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #49972

Re: odczytywanie zawartości iframa

#49972
From: Paweł Piskorz
Date: Tue, 20 Apr 2010 21:42
21 lines
1646 bytes
On 2010-04-20 22:01, Peter May wrote:
> Żeby wykonać powyższe musisz ładować cały jQuery? Po co?
>
> var el = document.getElementById("save");
> var ifr = document.createElement("iframe");
> ifr.src = "http://192.168.4.40/CiscoWebService.asmx/HelloWorld";

A fe! Jak już tak standardowo robisz, to setAttribute :P

> var myframe = document.getElementById("iframeid");
> var doc = (myframe.contentWindow || myframe.contentDocument);
>
> W zmiennej doc masz dostęp do zawartości iframe-a.

Pod warunkiem, że strona ma uprawnienia do tego co w ramce.


-- 
message[autor="PablO"]::after {
	content:"Pozdrawiam";
}
Technical Details
Message-ID: <hql74l$bk1$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <cf26ef3f-8ba4-40b5-af09-bf5156fe11ee@l37g2000vbd.googlegroups.com> <hql15u$dug$1@news.onet.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: Paweł Piskorz <nie.ma.maila@psikre.nie?>
Newsgroups: pl.comp.lang.javascript
Subject: Re: odczytywanie zawartości iframa
Date: Tue, 20 Apr 2010 23:42:38 +0200
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 21
Message-ID: <hql74l$bk1$1@inews.gazeta.pl>
References: <cf26ef3f-8ba4-40b5-af09-bf5156fe11ee@l37g2000vbd.googlegroups.com> <hql15u$dug$1@news.onet.pl>
NNTP-Posting-Host: 77-253-42-12.adsl.inetia.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1271799765 11905 77.253.42.12 (20 Apr 2010 21:42:45 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Tue, 20 Apr 2010 21:42:45 +0000 (UTC)
X-User: uhorek
In-Reply-To: <hql15u$dug$1@news.onet.pl>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 Hamster/2.1.0.11
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit