473,324 Members | 2,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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 5628
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: DC | last post by:
When a nonunique nonclustered index is built on top of a clustered index, is it guaranteed that the bookmark in the nonclustered index will be kept in the same order as the clustered index? ...
17
by: Danny J. Lesandrini | last post by:
The following code works with a standard MDB to navigate to a particluar record (with a DAO recordset, of course) but it's giving me problems in an ADP I'm working on. Dim rs As ADODB.Recordset...
1
by: ken | last post by:
What is the best way to do this: Table with primary key autonumber field and some text fields. main form: views this table one record at a time. subform: views whole table(datasheet view). When...
3
by: John Carnahan | last post by:
How would I accomplish the following ? Navigate to a bookmark on a page from a routine in the code behind. ---- html code bookmark1 (someplace on the page... is this an htmlanchor?) ??...
13
by: ukrbend | last post by:
I'm new to Javascript and to html and am trying to make the following code snippet work but it doesn't. It refuses to call the getPage() function and I always get a 404 error. I know the code is...
2
by: Jon | last post by:
All, I'm currently working with a PHP-based CMS application, and am begining to put the finishing touches on it via Javascript validation. Currently, I'm using fairly standard methods of...
0
by: Ben Fidge | last post by:
Hi I've got a situation where I need to direct a Response.Redirect to a new window from within a page embedded within an IFrame. Currently, we have a page embedded within an IFrame that...
2
by: Alan T | last post by:
How do I make use of the Bookmarks property so that I can write a text at/below the position of a particular bookmark or the first bookmark ? private Microsoft.Office.Interop.Word.Document...
0
by: johnw182 | last post by:
Ok, I have a asp.net project. Everything works great. HOWEVER, this project was made to be called from within a frame or iframe. When being used within the iframe the user gets a blank frame when...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.