fletchsod
asked on
Using anchor link in active window to get to a target link in iframe.
If I use a plain HTML in an active window only, I can easily whip out a HTML code to accomplish this task like this...
--snip--
<html>
<body>
<!-- To jump from a link like this to a target link: -->
<a href="#A">Letter "A" (Go From Letter "A')</a>
<!-- Blah Blah Blah of a long newspaper article in HTML fonts -->
<!-- Define the target like this: -->
<a name="A">Letter "B" (To This Letter "B")</a>
<!-- Blah Blah Blah of a long newspaper article in HTML fonts -->
</body>
</html>
--snip--
This is where the user can easily jump from the top to somewhere in the middle just like that. I'm now working on a project that would require the use of JavaScript which isn't a difficult thing to do but using this feature from above with a Letter "A" link in a main window (or a pop-up window) to jump to a Letter "B" inside of the iframe window, (even if the article in the iframe is long with a similiar effect as the one from above). I pretty much stumped on this one because I don't know what to look for to use a handle like this in JavaScript and in iframe.
Thanks,
Scott Fletcher
--snip--
<html>
<body>
<!-- To jump from a link like this to a target link: -->
<a href="#A">Letter "A" (Go From Letter "A')</a>
<!-- Blah Blah Blah of a long newspaper article in HTML fonts -->
<!-- Define the target like this: -->
<a name="A">Letter "B" (To This Letter "B")</a>
<!-- Blah Blah Blah of a long newspaper article in HTML fonts -->
</body>
</html>
--snip--
This is where the user can easily jump from the top to somewhere in the middle just like that. I'm now working on a project that would require the use of JavaScript which isn't a difficult thing to do but using this feature from above with a Letter "A" link in a main window (or a pop-up window) to jump to a Letter "B" inside of the iframe window, (even if the article in the iframe is long with a similiar effect as the one from above). I pretty much stumped on this one because I don't know what to look for to use a handle like this in JavaScript and in iframe.
Thanks,
Scott Fletcher
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help!!!
Scott F.
Scott F.
Thanks for the points, fletchsod.
From the look of your example code, you seem to know what you're doing. =)
~Codescripter
From the look of your example code, you seem to know what you're doing. =)
~Codescripter
ASKER
Been doing HTML, JavaScript and PHP for 4 years at my job. :-) Just came upon this situation and wasn't sure how to handle the link anchor. Have been doing a lot of writing for popup window and iframes in the last 6 months, so they come in handy. Cheers.
Scott F.
Scott F.
ASKER
--snip--
<!-- PopUp Window Script -->
<script type='text/javascript'>
parent.window.opener.docum
opener.parent.frames['Bill
opener.parent.frames['Bill
</script>
<!- Iframe Window -->
<a href="#" name="RowNum5">Test</a>