jQuery: How to add target attribute to window.location?
<p>I have a homepage with two frames.  The left frame is the navigation menu with about 30 links to different websites.  The right frame (frame name is "display") is used to display the content of websites when user click on the links on the navigation menu.</p>

<p><strong>Left Navigation Menu</strong>
This is part of the codes of the Left Navigation Menu:</p>

<pre><code>&lt;div id="LoadPage"&gt;
&lt;a id="link1" href="http://domain1.com" target="display"&gt;Website 1&lt;/a&gt;
&lt;br&gt;
&lt;a id="link2" href="http://domain2.com" target="display"&gt;Website 2&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>When user click on the links on the Left Navigation Menu, the website will be displayed on the Right Frame (display) correctly.</p>

<p>Now, I wish that a random website will be display when the homepage load. </p>

<p>I try the following codes:</p>

<p>Here's part of the jQuery codes in Header Section:</p>

<pre><code>&lt;script src="jquery.js" type="text/javascript"&gt;&lt;/script&gt;

  &lt;script type="text/javascript"&gt;

      $(document).ready(function() {
         .....................................
        ....................................


              if (randomNumber = 1) {

                  window.location = $("a#link1").attr("href"); 

              } else {
                  ...........................
              }


          });   

  &lt;/script&gt;
</code></pre>

<p><strong>Problem:</strong>
The problem with the above codes are that the website will display in the Left Navigation Window, not in the Right Window (display).</p>

<p>How can I add the target="display" attribute to this line of code so that the website will display in the Right Window (display)?</p>

<pre><code>window.location = $("a#link1").attr("href");
</code></pre>

<p>Please help!</p>

<p>Best regards</p>

<p>Alex</p>
