Forum Moderators: mack

Message Too Old, No Replies

iframe and pagination - Need Help

iframe, javascript

         

Alla Gringaus

9:30 pm on Jun 19, 2003 (gmt 0)

10+ Year Member



Hi!
I have an HTML page, with the iframe in it. The iframe is supposed to change its source as user clicks on the pagination as follows:

previous 1¦2¦3¦4¦5 next

the source for the iframe should change accordingly from go_page1.htm to go_page2.htm to go_page3.htm, etc. to avoid the reloading of the whole HTML page.

Need help for the pagination javascript code. THANKS!

Alla

pageoneresults

9:57 pm on Jun 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hello Alla, Welcome to WebmasterWorld!

Your links need a target. So, if we are discussing link #1, it might look like this...

<a href="link.htm" target="i1">

That target="i1" is what will bring the targeted page into the iframe. Your iframe also needs to be named so that the target works...

<iframe name="i1">

Note how the target="i1" matches the <iframe> name="i1". All of your links for that one <iframe> will have the same target.

Now, if you had two <iframe>s on the page, then one might be named "i1" and the other "i2". Depending on which <iframe> was to display which linked content, will determine how you target your links.

P.S. No javascript required!

tedster

10:42 pm on Jun 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I like the idea of using iframes for longer articles like this. For some reason I never thought of it before. As long as I take care of the search engine spiders by having a straight text link to each page somewhere else, it should make for a very comfortable experience for the user.

Thanks for bringing up the idea.

pageoneresults

10:51 pm on Jun 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



As long as I take care of the search engine spiders by having a straight text link to each page somewhere else, it should make for a very comfortable experience for the user.

<iframe>
<h1>Heading</h1>
<ol>
<li>link</li>
<li>link</li>
</ol>
</iframe>

That ordered list will present itself if the users browser does not support <iframe>s.

Alla Gringaus

10:54 pm on Jun 19, 2003 (gmt 0)

10+ Year Member



This is great. It worked. Thanks a lot!