Navigating to a bookmark within an IFrame
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Navigating to a bookmark within an IFrame

From: Adrian <Adrian@nospamhotmail.com.uk>
Date: Wed Nov 02 2005 - 13:24:48 CET

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=3Dbm
return
}

called by :

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

but it doesn't seem to work!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2769" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>
<P><FONT face=3DArial size=3D2>Hi All,</FONT></P>
<P><FONT face=3DArial size=3D2>I load an Iframe within html page =
contained within=20
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=20
reload.</FONT></P>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P>
<P><FONT face=3DArial size=3D2>How do I do this?</FONT></P>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P>
<P><FONT face=3DArial size=3D2>I have tried:</FONT></P>
<P><FONT face=3DArial size=3D2>function=20
navIContent(bm)<BR>{<BR>IContent.src=3Dbm<BR>return<BR>}</FONT></P>
<P><FONT face=3DArial size=3D2>called by :</FONT></P>
<P><FONT face=3DArial=20
size=3D2>onclick=3D'navIContent("../content.htm#test")'</FONT></P>
<P><FONT face=3DArial size=3D2>but it doesn't seem to=20
work!</FONT></P></DIV></BODY></HTML>
Received on Mon Nov 21 03:16:21 2005