Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8702947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:46:28+00:00 2026-06-13T02:46:28+00:00

This topic may have lots of code out there, BUT I seem to be

  • 0

This topic may have lots of code out there, BUT I seem to be looking for a variation that isn’t based on history, is it possible…

So I have this code…

<script type="text/javascript">
var pages=new Array();

pages[0]="listItem1.html";
pages[1]="listItem2.html";
pages[2]="listItem3.html";
pages[3]="listItem4.html";
pages[4]="listItem5.html";

var i=0;
var end=pages.length;
end--;
function changeSrc(operation) {
if (operation=="next") {
if (i==end) {
  document.getElementById('the_iframe').src=pages[end];
  i=0;}
else {
  document.getElementById('the_iframe').src=pages[i];
  i++;}}
if (operation=="back") {
if (i==0) {
  document.getElementById('the_iframe').src=pages[0];
  i=end;}
else {
  document.getElementById('the_iframe').src=pages[i];
  i--;}}}
</script>
</head>

<body>

<ul id="menu" role="group">

<li><a href="listItem1.html" target="ifrm" role="treeitem">Welcome</a>
  <ul>
    <li><a href="listItem2.html" target="ifrm" role="treeitem">Ease of Access Center</a></li>
  </ul>
</li>    

<li><a href="listItem3.html" target="ifrm">Getting Started</a>
  <ul>      
    <li><a href="listItem4.html" target="ifrm">Considerations</a></li>
    <li><a href="listItem5.html" target="ifrm">Changing Perspective</a></li>
  </ul>
</li>
</ul>


<iframe id="the_iframe" scrolling="no" src="listItem1.htm" name="ifrm" style="width:540px;></iframe>


<input type="button" onClick="changeSrc('back');" value="Back" />
<input type="button" onClick="changeSrc('next');" value="Next" />

and if I click on the next or prev button, it does move somewhere,but…

let’s say my iframe is showing listItem2, then I click on listItem4 in the menu (there is a tree menu involved), then I want to go to listItem3 and I hit the back button…instead of going to listItem3, it goes to listItem2 (or someplace that is not back a page from 4 to 3).

It appears that the buttons are navigating based on history?…but I just want a straight forward or backward movement…I don’t want my buttons to have this browser-type functionality…If I’m on listItem4 and hit the next button, I want it to go to listItem5.

Many Thanks For Any Help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T02:46:30+00:00Added an answer on June 13, 2026 at 2:46 am

    Okay, I’ll try the code, but don’t down-rate it if its off.

    This is the function that you could put before the changeSrc function:

    function UpdateI(value) {i = value}

    This the one click event that you would add to your links in the a tag. Off course, the 4 that is sent the function in this case, would be changed to whatever is appropriate for whatever ListItem is being referenced:

    onClick =”UpdateI(4)”

    Does this help you?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I understand that this question may seem somewhat ungrounded, but if someone knows anything
May a DTO have relations to other DTOs? Any more opinions on this topic
I may have the wrong pattern here, but I think it's a fair topic.
I realize there have been a few other questions on this topic, and the
Ok I have looked at a few questions on here concerning this topic. But
I have researched this topic, but am afraid I have too little experience with
I realize that there are a couple other posts on this topic, however the
Some of you may have seen my blog post on this topic, where I
this may be a stupid question: I currently have some VM arguments that my
I know that this topic has been beaten to death, but it seems that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.