|
-
July 19th, 2005, 06:28 AM
#1
Scroll to Named Anchor in IFRAME
Hi,
I am working on a page that includes an Iframe. Inside this Iframe I dynamically assign named anchors.
Now, what I want to do is as follows: I want to use a SELECT menu to scroll to the named anchors in the Iframe.
However, the SELECT menu is not situated in the Iframe source page, but rather in the page containing the Iframe.
In other words; I've got a page called index.php that contains both the
coding for the SELECT menu:
Code:
<select name='menu' onchange='scroll2anchor();'>
and the iframe coding:
Code:
<IFRAME name="gerechten" src="lijst_gerechten_test.php"></IFRAME>
The option values in the SELECT menu coincide with the named anchors, and I am using them to determine to which named anchor needs to be scrolled. Thus, selecting option 4 would have to scroll to named anchor 4.
I tried to use a javascript function that contains:
Code:
function scroll2anchor(a) {
var lok;
lok = "#"+a;
document.gerechten.location.href=lok;
}
But rather than scrolling to the named anchor in the Iframe, it actually loads the entire page inside the Iframe.
Can anyone help me out with this issue? If you need more information just let me know.
Thx in advance!
With kind regards,
Oculas
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|