How do I link to a specific record using iFrame?

H

Hugh G. Johnson

I have a knowledgebase (KB) system I installed into my existing dynamicly
driven site. I used iFrame to grab the KB and place it in the content area
of the page. This works great, but I realize now that I can't reference a
certain article, such as /article.aspx?id=10221. Adding the record number
does nothing since the iFrame references the article.aspx.

What can I do to pass a variable to the iFrame?

Thanks!

Hugh
 
H

Hywel

I have a knowledgebase (KB) system I installed into my existing dynamicly
driven site. I used iFrame to grab the KB and place it in the content area
of the page. This works great, but I realize now that I can't reference a
certain article, such as /article.aspx?id=10221. Adding the record number
does nothing since the iFrame references the article.aspx.

The code in article.aspx has to handle the ID.
What can I do to pass a variable to the iFrame?

Just as you are doing. Is there any code in article.aspx to make any
use of the ID you pass it?
 
H

Hugh G. Johnson

Thank you Hywel.

I'm not sure what the code would need to be since I have two pages that I am
working with. The parent page is called knowledgebase.aspx and has the
iframe script below. Would I need to put this in the parent page, or the
iFrame below?:

<SCRIPT language=JavaScript>
<!--
function calcHeight()
{
//find the height of the internal page
var the_height =
document.getElementById('the_iframe').contentWindow.document.body.scrollHeight;

//change the height of the iframe
document.getElementById('the_iframe').height = the_height;
}
//-->
</SCRIPT>
<IFRAME id=the_iframe align=left src="/knowledgebase/default.aspx"
frameBorder=0
width="100%" scrolling=no onload=calcHeight();
height=446>
Houston, we have a problem. We got a bit ahead of ourselves and made this
with iFrame browsers in mind. We're so sorry. Please visit the knowledge
base directly <href="http://www.anydomain.com/knowledgebase/">here.</a>
</IFRAME>
 
H

Hywel

Thank you Hywel.

I'm not sure what the code would need to be since I have two pages that I am
working with. The parent page is called knowledgebase.aspx and has the
iframe script below. Would I need to put this in the parent page, or the
iFrame below?:

That client-side JS is probably irrelevant - you need to edit the
server-side code.
 

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

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top