How to navigate through an array of urls as list of links and with previous/next links?
<p>I have an array of urls that I want to display one by one in an iframe. The user will navigate to each URL by clicking a link in a list of the URLs or by clicking the previous/next links. What is the best way to do this? Working code snippets would be very very appreciated.</p>

<p>I'm posting as few details as possible below for best clarity.</p>

<pre><code>var urls = [{"name":"ebay","url":"http://ebay.com"},
{"name":"amazon","url":"http://amazon.com"},
{"name":"msn","url":"http://msn.com"},
{"name":"yahoo","url":"http://yahoo.com"},
{"name":"wikipedia","url":"http://wikipedia.org"}];
</code></pre>

<p>List of links (alternate way to navigate instead of prev/next links below)</p>

<pre><code>&lt;ol id="list"&gt;
  &lt;li&gt;&lt;a href="" target="myframe"&gt;ebay&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="" target="myframe"&gt;amazon&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="" target="myframe"&gt;msn&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="" target="myframe"&gt;yahoo&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="" target="myframe"&gt;wikipedia&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

currently viewing: &lt;span id="current"&gt;&lt;/span&gt;

prev: &lt;a href="" target="myframe"&gt;&lt;/a&gt; | next: &lt;a href="" target="myframe"&gt;&lt;/a&gt;

//all the links will open inside this iframe using target="myframe"
&lt;iframe src="" name="myframe" id="myframe"&gt;&lt;/iframe&gt;
</code></pre>
