468,765 Members | 1,598 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Navigating to a bookmark within an IFrame

Hi All,

I load an Iframe within html page contained within another page and from the hosting page I would like to scroll to a given bookmark within the page loaded within the iframe without causing it to reload.

How do I do this?

I have tried:

function navIContent(bm)
{
IContent.src=bm
return
}

called by :

onclick='navIContent("../content.htm#test")'

but it doesn't seem to work!

Nov 2 '05 #1
3 5296
If you were in the iframe and wanted to say get the focus for something
you would say:

parent.document.getElementById("someid").focus();

Nov 2 '05 #2
> "Adrian" <Ad****@nospamhotmail.com.uk> wrote:
news:dk**********@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com....

Hi All,

I load an Iframe within html page contained within another page and
from the hosting page I would like to scroll to a given bookmark
within the page loaded within the iframe without causing it to
reload.

How do I do this?

I have tried:

function navIContent(bm)
{
IContent.src=bm
return
}

called by :

onclick='navIContent("../content.htm#test")'

but it doesn't seem to work!


Are you wanting to do something like this:

http://i.1asphost.com/BootNic/ifb.asp

--
BootNic Wednesday, November 02, 2005 1:22 PM

Every time I close the door on reality it comes in through the windows.
*Jennifer Unlimited*

Nov 2 '05 #3
Yes thanks that will do it!

function flick(frameId,bookmarkId){
var gip=document.getElementById(frameId)
var x=gip.contentWindow.document.getElementById(bookma rkId).offsetLeft
var y=gip.contentWindow.document.getElementById(bookma rkId).offsetTop
gip.contentWindow.scrollTo(x,y)
}
"BootNic" <Bo*****@bounce.prodigy.net> wrote in message
news:Tt*****************@newssvr33.news.prodigy.co m...
"Adrian" <Ad****@nospamhotmail.com.uk> wrote:
news:dk**********@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com....

Hi All,

I load an Iframe within html page contained within another page and
from the hosting page I would like to scroll to a given bookmark
within the page loaded within the iframe without causing it to
reload.

How do I do this?

I have tried:

function navIContent(bm)
{
IContent.src=bm
return
}

called by :

onclick='navIContent("../content.htm#test")'

but it doesn't seem to work!


Are you wanting to do something like this:

http://i.1asphost.com/BootNic/ifb.asp

--
BootNic Wednesday, November 02, 2005 1:22 PM

Every time I close the door on reality it comes in through the windows.
*Jennifer Unlimited*
Nov 2 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by John Carnahan | last post: by
13 posts views Thread by ukrbend | last post: by
reply views Thread by Ben Fidge | last post: by
2 posts views Thread by Alan T | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.