Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using an Object Element to Go to Bookmark in HTML File

Status
Not open for further replies.

JBorges

Technical User
Jan 12, 2009
57
0
0
DK
Hi.

I'm trying to reference a bookmark using the object tag element.

I've tested this in Safari and Firefox, same files different results. Firefox jumps to the section in the object element with no issues. But Safari merely loads the iframe.html file and doesn't jump to the bookmark.

My test.html
Code:
<html>
<head>

<body>

<div><object data="iframe.html#section4"></object></div> 

</body>
</html>

My iframe.html
Code:
<html>
<head>

<body>
<a href="#section4">Section 4</a>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<a id="section4">Section 4</a><br>
You have reached section 4.
</body>
</html>


Any ideas why there is inconsistent behavior and is there work-around?

Thanks.

Philip
 
I was merely experimenting with it. Of course I can use an iframe, and I'm doing that now. Just wondering why it doesn't work in Safari,but in Firefox. Anyway I filed a report to Apple about this bug, since it still doesn't work with the latest version of Safari.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top