I want to change the href destination of a link, based upon the page title or document's filename of an iframe.
For example: If the TITLE of the iframe is Poem1, or the document loaded in the iframe is poem1.html, then I want the "Next" link (on the main page) to point to poem2.html
[HTML]<html>
<head>
<title>Poem1</title>
</head>
<body>
<a href="poems/poem2.html" id="link1">Next </a><p></p>
<iframe name="inline1" src="poems/poem1.html">
</iframe>
</body>
</html>[/HTML]
But that is not all... I will have an indefinite amount of pages with filenames like so poem[#].html starting with poem1.html, poem2.html, poem3.html
I want to just be able to tell the link to change the href to the next numbered page. If on page poem23, the Next link should change to go to poem24
I have no idea what the syntax what I am doing
[CODE=JavaScript (yeah, right)]
document.link1. href == newLink
newLink = (currentLink + 1 )
currentLink = document.inline 1.src[/CODE]
Do you understand how clueless I really am? I have no clue what I'm doing!
Anyone?
For example: If the TITLE of the iframe is Poem1, or the document loaded in the iframe is poem1.html, then I want the "Next" link (on the main page) to point to poem2.html
[HTML]<html>
<head>
<title>Poem1</title>
</head>
<body>
<a href="poems/poem2.html" id="link1">Next </a><p></p>
<iframe name="inline1" src="poems/poem1.html">
</iframe>
</body>
</html>[/HTML]
But that is not all... I will have an indefinite amount of pages with filenames like so poem[#].html starting with poem1.html, poem2.html, poem3.html
I want to just be able to tell the link to change the href to the next numbered page. If on page poem23, the Next link should change to go to poem24
I have no idea what the syntax what I am doing
[CODE=JavaScript (yeah, right)]
document.link1. href == newLink
newLink = (currentLink + 1 )
currentLink = document.inline 1.src[/CODE]
Do you understand how clueless I really am? I have no clue what I'm doing!
Anyone?
Comment