displaying a list of pictures?

Discussion in 'Javascript' started by David. E. Goble, May 21, 2005.

  1. Hi all;

    I have this list of pictures;

    <script type="text/javascript">
    var picssigs = new
    Array("sigs/finished1.jpg","sigs/foghorn.jpg","sigs/motto.jpg","sigs/sig.jpg","sigs/SWAT.jpg","sigs/title.gif");
    var pictsigs = Math.round(Math.random()*(picssigs.length-1));
    for (var i=0; i<picssigs.length; i++) {
    var imgsigs = new Image();
    imgsigs.src = picssigs;
    }

    How do I display these pictures like;

    <pic1> <pic2> <pic3> ...etc...
    <pic4> <pic5> ...etc...

    Regards David. E. Goble
    http://degoble.customer.netspace.net.au
    degoble[AT]netspace.net.au
    Po Box 648 (9 Murray St), Kingscote, Kangaroo Island SA 5223
    David. E. Goble, May 21, 2005
    #1
    1. Advertising

  2. David. E. Goble

    Randy Webb Guest

    David. E. Goble wrote:
    > Hi all;
    >
    > I have this list of pictures;
    >
    > <script type="text/javascript">
    > var picssigs = new
    > Array("sigs/finished1.jpg","sigs/foghorn.jpg","sigs/motto.jpg","sigs/sig.jpg","sigs/SWAT.jpg","sigs/title.gif");
    > var pictsigs = Math.round(Math.random()*(picssigs.length-1));
    > for (var i=0; i<picssigs.length; i++) {
    > var imgsigs = new Image();
    > imgsigs.src = picssigs;
    > }
    >
    > How do I display these pictures like;
    >
    > <pic1> <pic2> <pic3> ...etc...
    > <pic4> <pic5> ...etc...



    var myVar = '';
    for (var i=0; i<picssigs.length; i++) {
    myVar += '<img src="'+picssigs+'">
    }

    document.write(myVar)

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Randy Webb, May 21, 2005
    #2
    1. Advertising

  3. On Sat, 21 May 2005 16:40:38 -0400, Randy Webb
    <> wrote:

    >David. E. Goble wrote:
    >> Hi all;
    >>
    >> I have this list of pictures;
    >>
    >> <script type="text/javascript">
    >> var picssigs = new
    >> Array("sigs/finished1.jpg","sigs/foghorn.jpg","sigs/motto.jpg","sigs/sig.jpg","sigs/SWAT.jpg","sigs/title.gif");
    >> var pictsigs = Math.round(Math.random()*(picssigs.length-1));
    >> for (var i=0; i<picssigs.length; i++) {
    >> var imgsigs = new Image();
    >> imgsigs.src = picssigs;
    >> }
    >>
    >> How do I display these pictures like;
    >>
    >> <pic1> <pic2> <pic3> ...etc...
    >> <pic4> <pic5> ...etc...

    >
    >
    >var myVar = '';
    >for (var i=0; i<picssigs.length; i++) {
    >myVar += '<img src="'+picssigs+'">
    >}
    >
    >document.write(myVar)
    >

    Ok! How do I get the pics display in

    <h1>sigs</h1>
    <table border="1">
    <tr>
    <td> <-- Here --> </td>
    </tr>
    </table>

    Regards David. E. Goble
    http://degoble.customer.netspace.net.au
    degoble[AT]netspace.net.au
    Po Box 648 (9 Murray St), Kingscote, Kangaroo Island SA 5223
    David. E. Goble, May 23, 2005
    #3
  4. David. E. Goble

    Random Guest

    <h1>sigs</h1>
    <table border="1">
    <tr>
    <td>
    <script>
    var myVar = '';
    for (var i=0; i<picssigs.length; i++)
    myVar += '<img src="'+picssigs+'">';

    document.write(myVar);
    </script>
    </td>
    </tr>
    </table>

    ?

    David. E. Goble wrote:
    > Ok! How do I get the pics display in
    >
    > <h1>sigs</h1>
    > <table border="1">
    > <tr>
    > <td> <-- Here --> </td>
    > </tr>
    > </table>
    >
    > Regards David. E. Goble
    > http://degoble.customer.netspace.net.au
    > degoble[AT]netspace.net.au
    > Po Box 648 (9 Murray St), Kingscote, Kangaroo Island SA 5223
    Random, May 23, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. news.onet.pl
    Replies:
    1
    Views:
    302
  2. Martin Raychev
    Replies:
    1
    Views:
    280
    Alvin Bruney [MVP]
    Mar 2, 2004
  3. qqqq

    Pictures not displaying

    qqqq, Jan 19, 2005, in forum: ASP General
    Replies:
    4
    Views:
    120
  4. Oli Waters
    Replies:
    3
    Views:
    96
    Andy Baxter
    Jan 12, 2004
  5. Oli Waters
    Replies:
    2
    Views:
    257
    Andy Baxter
    Jan 12, 2004
Loading...

Share This Page