2 frames, 1 is a local source, 1 is is an external source.
The external source has forms (type GET) and a input fields.
I want to fill the forms in the second frame (external source) from Javascript in the first frame (local source) like ‘push buttom to fill and submit the form’.
Problem is an input field of type image, that is used to submit a form.
I can get to the element with document.getElementById(…), but there I an lost.
Missing the obvious?
Any specialist with an idea? Any script sniplet that would solve the problem?
I assume that what you are saying is that when you click on an image in one form, some values are copied across to the second form.
If so add an onclick event to the image to call a function set up in the HEAD section:
The first frame with the local source is not the problem (onclick and so on).
The second frame is driving me nuts!
Normally you would click on the image of the input function to submit the form and relative position of the mouse over the image would be part of the values transfered. This I need to simulate by a javascript running if I click on a button in the first (local source) frame.
Since the second frame is an external source, security protection (different domain) of that page in the second frame hits me. So I can’t address th elements by name there. I can address the input element (not the form) with document.getElementById because it has a unique ID , but how do I simulate a mouse click on that image? Am I missing the right syntax? Am I on the wrong way at all?
In the meantime I figured where the main problem is:
Frame 1: Domain local
Frame 2: Domain external
The Domain Security Model prevents frame 1 from having the needed access rights to frame 2 because of the different domains.
Solution for Firefox: Extensions running on chrome level do have root rights in DOM. Reading into ‘How to’ for extensions…