467,915 Members | 1,158 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

How do I link to a specific record using iFrame?

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
Jul 23 '05 #1
  • viewed: 1265
Share:
3 Replies
In article <db********************@comcast.com>, Hugh G. Johnson says...
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?

--
Hywel

http://sponsorhywel.org.uk/
Jul 23 '05 #2
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').contentWindo w.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>

"Hywel" <hy**********@hotmail.com> wrote in message
news:MP************************@news.individual.ne t...
In article <db********************@comcast.com>, Hugh G. Johnson says...
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?

--
Hywel

http://sponsorhywel.org.uk/

Jul 23 '05 #3
In article <v_********************@comcast.com>, Hugh G. Johnson says...
"Hywel" <hy**********@hotmail.com> wrote in message
news:MP************************@news.individual.ne t...
In article <db********************@comcast.com>, Hugh G. Johnson says...
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?

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.

--
Hywel

http://sponsorhywel.org.uk/
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by jeet_sen | last post: by
11 posts views Thread by nma | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.