473,748 Members | 8,773 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inject data into a iframe loaded page ?

3 New Member
Hi,

I am trying to do the following and would like to know if it's possible using Javascript/Ajax/and some DB

I have an Iframe hosted on one server that loads a page which is located on another server.

So mydomain.com is in the browser address bar and loads PageA (from Mydomain2.com). Page A contains a form and a submit button.

I need to Inject some data from the Db into one or several fields contained in the Form on PageA. And have an autoSubmit action done automatically .

Is it possible ? Without having to load a script or some element on mydomain2.com server where PageA is hosted. Or some code on PageA itself.

Thank you for your assistance

J
Nov 20 '08 #1
5 5141
gits
5,390 Recognized Expert Moderator Expert
with javascript alone you cannot do any cross-site-scripting ... so: no you cannot do it ...

kind regards
Nov 20 '08 #2
jeffos101
3 New Member
Any other method It can be done AJAX, PHP, SOAP whatever is clever ?
Nov 20 '08 #3
gits
5,390 Recognized Expert Moderator Expert
you could do a serverside http request to retrieve the page from the other domain serverside (use whatever you want) then 'copy' it and process/add anything you need and send it from 'your' domain ... now you have 'proxyed' this page and it is no cross-site-issue anymore ;) ... but you should check whether the provider of this page has anything against this behaviour unless you not provide this page for yourself ...

kind regards
Nov 20 '08 #4
jeffos101
3 New Member
Ok. With this method. If user 1 goes to mydomain.com and the script performs the action, the session info, IP etc.. submited will be from user 1 or would be the info of the server mydomain.com is hosted on. ?
Nov 20 '08 #5
gits
5,390 Recognized Expert Moderator Expert
the 'other' page rely on session data? in this case i'm not sure whether your server (proxy) could handle this session data and how this could be done ... so i cannot help further in this case. but without a similar method (serverside proxy) you cannot add anything to the page in question ...

kind regards
Nov 20 '08 #6

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

Similar topics

5
7211
by: Pete Wason | last post by:
Hiall! I have a demo viewer page for javascript stuff that has three buttons "DEMO" "HTML" and "JSCR", and an IFRAME called 'viewer'. Initially, the IFRAME gets loaded with the actual demo page, ie., viewer.location = dName + '.html'; where dName is the filename of the demo without extension.
4
5007
by: Paul Brant | last post by:
Hi all, I have a page with an IFRAME in it. From a script in the main ( parent ) page I instruct the IFRAME to load a specific URL. The URL contains parameters that are processed by the server. The server then writes a result cookie into the content destined for the IFRAME. I am having issues accessing the cookie. If I use a debuger I can see the cookie via a quickwatch looking at window.frames.document.cookie however when I run the...
4
5512
by: seans | last post by:
Hi, Is there some way from preventing the JavaScript code in a document loaded into an iframe from executing? I don't have access to the pages being loaded into the i-frame so I can't modify then. They are being loaded from a server. thanks again. sean
4
28008
by: christine.nguyen | last post by:
Hello, Here's the deal. I have an html page that contains an iframe. This iframe has an id that is unknown to me. This iframe also has test.html as it's source. Within test.html runs some javascript. Within this javascript that runs in test.html, I want to obtain the id of the iframe that loaded test.html in the first place. Is this possible?? I have no control over the iframe at all. The iframe will be loaded on some random html...
8
9418
by: '69 Camaro | last post by:
Perhaps I'm Googling for the wrong terms. Does anyone have links to examples of the syntax necessary to read the HTML on another Web page when that HTML is produced from JavaScript using the document.write( ) method? For a simplified example, I have two Web pages. Page 1 uses JavaScript with the following: htmlData = "<B>This is bold text.</B>"; document.write(htmlData);
9
11187
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 DIV: <IFRAME id=myframe style="display:none" src="..." onload="ShowNews(this)"></IFRAME>
3
4488
by: PCgeek | last post by:
sorry moved this over to javascript forum, didn't mean to post 2x! Hi guys, I'm trying to put the finishing touches on my website and could really use some help on this particular issue. My page includes background music with a javascript music player on the main page below an iframe that is used for all content and navigation of the site and so that the music doesn't reload each time a page is switched. There is another javascript to resize...
1
3052
by: knkk | last post by:
Hi, I have an iframe that fetches content from a different domain. This is my URL, which has an iframe that fetches content from another site careerbuilder.co.in (this is a partnership channel, so they will co-operate if there are small things they need to do in their code, like putting something in the body tag or adding some script, though I would ideally like everything to be done in this page, and not in their pages). ...
2
7167
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi misters, I have a aspx page that loads PDF files into a frame (I call an ShowFile.aspx file that uses Response.BinaryWrite). I want that the user can see div with the message loading and finished it when the PDF file have been loaded. I have onload function for iframe but doesn't work, because never is called. Appears progress bar in IE 6.0 but not go up.
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9548
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9325
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.