473,378 Members | 1,407 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

getting the innerHTML of a iframe element

what i want to do is to:
create a iframe,set his src to let say http://www.google.com then in the iframe(using code from the mainpage) get the search input element and fill it and get the links from the response.

the problem is that if i try to get the IFrameElement.contentWindow.document.body i get a exception in FireFox that say i can`t get the element coz it is some kind of security/premisions.

how can i do this? i just want something that can emulate this python code:
urlopen(someexternalurl).read()

just get a reponse without using anything besides JavaScript.

thx alot
Jun 30 '06 #1
1 5493
acoder
16,027 Expert Mod 8TB
This kind of cross-domain access is not allowed. The only way is to load the website from your own domain using some servers-side code, then you should be able to access elements using JavaScript.
Apr 26 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: JimMenees | last post by:
(code is at end of post) ------------------------------------------- I'm using an i-frame to grab a server-side text file and display its content elsewhere in the html document. On change of the...
7
by: Lorenzo Vaina | last post by:
Can i get the content of an URL and put it in a variable using javascript? I want js execute different operations varying a file that is on internet. Thanks, regards.
1
by: Martin | last post by:
There seems to be some strange behaviour when trying to get the scrollHeight and scrollTop of an iframe in IE6. I have tried several ways of getting these values when the iframe is written into...
15
by: Aaron Gray | last post by:
<iframe name="iframe" width="100%" height="25%" src="test1.txt"> </iframe> <a href="test1.txt" target="input">one</a> <a href="test2.txt" target="input">two</a> <form name="form1"> <textarea...
9
by: aatcbbtccctc | last post by:
Hi folks I've googled for an answer to this, with no success. Can someone please jump in, and put me out of my misery! (I'm sure it's quite simple) I have an invisible IFRAME, and a visible...
22
by: Chris Moltisanti | last post by:
Hey, I have a DIV and I want to dynamically set its innerHTML. I know I can set it by doing the following myDiv.innerHTML = '<img src=\"myImage.gif\">' However, the html that I want to set in...
4
by: Drew | last post by:
This might beyond the scope of this group because it deals with SharePoint, but I'm not sure if I can't get it to work because of SharePoint or because JavaScript is weird (I don't have much...
5
by: tsukasakun | last post by:
Is it possible to get the contents of an iframe (I need a method that allows me to get the generated HTML code of an XML file that was transformed by an XSL file)? Thanks in advance! :)
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.