Document Elements across Frames

D

David Logan

Hello,

I am trying to write a page that displays a PDF document in right site
of the page and a navigation bar on the left side. The only way I
know to do this is using frames or iFrames and I am trying to be as
browser independent as possible. Here is what my frame page looks
like.

<HTML>
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> </HEAD>
<form id=frmBookViewVPDF name=frmBookViewVPDF>
<frameset FRAMEBORDER="0" FRAMESPACING="0" BORDER="0"
COLS="200,*">
<frameset FRAMEBORDER="0" FRAMESPACING="0" BORDER="0"
Rows="*,1">
<frame name="fraToolBar" src="BookViewVPDFToolbar.asp">
<frame name="fraControl" src="BookViewVPDFControl.asp">
</frameset>
<frame scrolling="no" name="fraImage" src="blank.htm">
</frameset>
</form>
</HTML>

The javasciprt for BookViewVPDFControl.asp

function ControlWindow_onload()
{
var cellPrev =
window.parent.fraToolBar.document.getElementById('tdPrevImage');
var newCell = document.createElement('td');
var objParent = cellPrev.parentNode;
newCell.innerHTML = sPrevImage
objParent.replaceChild(newCell, cellPrev);
}

I've tried all kinds of combinations to do this but none have worked
does anybody have an suggestions? What I am trying to do is update
links from hidden frame to the other two frames without all three
frames making trips back to the server.

Thanks

David Logan
 
A

Adrienne

Gazing into my crystal ball I observed (e-mail address removed) (David Logan)
writing in
Hello,

I am trying to write a page that displays a PDF document in right site
of the page and a navigation bar on the left side. The only way I
know to do this is using frames or iFrames and I am trying to be as
browser independent as possible. Here is what my frame page looks
like.

<HTML>
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> </HEAD> <form
id=frmBookViewVPDF name=frmBookViewVPDF>
<frameset FRAMEBORDER="0" FRAMESPACING="0" BORDER="0"
COLS="200,*">
<frameset FRAMEBORDER="0" FRAMESPACING="0" BORDER="0"
Rows="*,1">
<frame name="fraToolBar" src="BookViewVPDFToolbar.asp">
<frame name="fraControl" src="BookViewVPDFControl.asp">
</frameset>
<frame scrolling="no" name="fraImage" src="blank.htm">
</frameset>
</form>
</HTML>

The javasciprt for BookViewVPDFControl.asp

function ControlWindow_onload()
{
var cellPrev =
window.parent.fraToolBar.document.getElementById('tdPrevImage');
var newCell = document.createElement('td');
var objParent = cellPrev.parentNode;
newCell.innerHTML = sPrevImage
objParent.replaceChild(newCell, cellPrev);
}

I've tried all kinds of combinations to do this but none have worked
does anybody have an suggestions? What I am trying to do is update
links from hidden frame to the other two frames without all three
frames making trips back to the server.

Thanks

David Logan

What you're doing is basically illegal, and no wonder it does not work.
The form element _must_ be inside of a body element. You could put the
form element in one of the frame documents, which would mean there would
only be one trip to the server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top