Welcome to WebmasterWorld Guest from 184.108.40.206
Forum Moderators: open
Mine has a slight twist to it and some comments on the above mention post from psuedo...
Here is the problem...
I am creating a website which uses some FLASH navigation and IFRAMES. I have created a page called home.html which contains a left nave menu designed in flash. The navigation is a scroller which has several links within the movie that should take the user to a page called release_notes.html
Now this page release_notes.html contains an IFRAME releasenotes.htm which has about 10 named anchors on it...
What happens is that when a user is on HOME.HTML and clicks on a link form the FLASH nav system - it does take them to the proper page release_notes.html which also properly displays the IFRAME releasenotes.htm
---> HOWEVER <---
I cannot seem to get the iframe to position the page to the proper NAME ANCHOR it was suppose to...
now... back to the above mentioned forum topic I read which contained a very simular problem... in there tedster posted some code that dynamically wrote the anchor name...
Well I followed those instructions and receieved an INVALID MARKUP which said it had a duplicate attribute... So I figured I might have done it wrong.. so I copied and pasted the code that tedster supplied and it also gave me the same INVALID MARKUP error
Any help with this situation would be so greatly appreciated...
[edited by: tedster at 5:15 am (utc) on Mar. 1, 2003]
My apologies - I never actually tested that code. On a second look, I can see that the quote marks were messed up. Here's my second try. Let me know if it works for you:
document.write('<iframe src="faq_scroll.html\#' + anchorname + '" name="faq_scroll">LINK<\/iframe>')
If there are still problems, I will take some time later on to test that line.
document.write('<iframe src="faq_scroll.html#' + anchorname + '" name="faq_scroll"></iframe>')
The quotes are a bit tricky. One little slip and the browser thinks that the document.write argument has been closed -- before you wanted it to be. The end result is writing in an incomplete HTML tag. But the above code worked for me in all cases.
Also take care to have a space between '" and name="faq_scroll". If that space isn't written in, the name attribute will bump up agains the URL in the generated HTML.
The script just concatenates three parts that are written to the HTML through document.write():
1. First half of the opening iframe tag
2. Anchorname (passed as a variable from the orphaned landing page)
3. Second half of the opening iframe tag plus the close tag