Below is a code snippet of some frames I am trying to traverse using the DOM in javascript. I can use document.getElementById('raiseConfirm').click() in FF and IE. It will not work in safari. I have tried a multitude of different things to try and get to the anchor with the ID raiseConfirm. It looks as if document.getElementById() in this case doesn’t find any of the elements in this frame. I have tried window.document, self.document, contentWindow,contentDocument, I have tried naming the frame like this, window.frames['gvdd'].document, and when I test this, the document is an object and has things in it, but as soon as I try to use the function getElementById() on it, it returns undefined or null.
Can anyone point me to the correct solution?
<form method="POST"
action="somescript.asp?CMD=POST&TODO=TRUE2"
id="FORMSV2DISPLAY"
name="FORMSV2DISPLAY">
<a id="raiseConfirm" href="#divConfirm" class="nyroModal">HERE IT IS</a>
<div id="divConfirm" style="display:none;">…</div>
I tried to say this before and it posted weirdly. I was able to fix this problem using JQuery and this is what I did.