Anchor pointing to a scene using Iframe


(Brian Pandiscio) #1

Hello HYPE Pros! Hype has been one of the most exciting compliments to my client services. Very happy and pleased with the job you all have done! Amazing! Believe it or not this is my first road block only because everything else has been so well documented in the forums thus far. But here it is!

I am trying to create either a:

1.) HTML anchor in a web page that loads a particular scene in a Hype Document. NOTE: BUT I am using iFrame in order to take advantage of the Java resizing scripts.

2.) Or some JS to “on-load” go to a particular scene of a hypDoc but using the hypeFrame HTML source file.

ex.

http://www.bahamaboatworks.com/gallery.html

Look forward to a solution. Because maintaining 3 separate galleries doesn’t make sense.


#2

Here’s a technique to link scenes to URLs: Linking to a specific scene from inside and outside of a Tumult Hype document

Your URLs would appear as http://example.com/index.html#scenename.

If you are trying to control a frame’s ‘src’ or URL, you would need to use some JavaScript.

To create a button that you can use to load a different website in a box, follow these steps:

Let’s say you have an iframe with the id of frame1. You would need to run this function to change its SRC:

var newframesrc = 'http://site.com/documentname.html#scene1';
document.getElementById('frame1').src = newframesrc;

To create separate Tumult Hype documents that can be loaded from URLs like http://example.com/support or http://example.com/contact you would export a document named ‘index’ into the ‘support’ and ‘contact’ folders on your web host.


#3

This page has a different approach if you wanted to see another way:


(Trey Yancy) #4

Please see: Anchors jumping to top of page in Safari

I am not able to resolve this issue.

Site created in Hype, tall page, vertical stack of grouped items, each of which has a link to a separate hype-generated page, an object in each group is given a specific ID. The back links are designed to take the user back to the associated group in the tall page. If I use # for the backlink I am taken to the top of the page. If I use /# the page can’t be found. /# worked at first, but then it stopped working (without a change to any of the IDs. Everything works great in Firefox.)


(Brian Pandiscio) #5

Meant to thank you for this! Worked well.