Document.Write Doesn't

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tom

    Document.Write Doesn't

    Since the Sony camera saves images with a set name convention, I would
    like the following program to create an on the fly listing of the
    images in the directory. Any help is appreciated!

    <HTML>
    <HEAD><TITLE> FD Mavica image viewer</TITLE></HEAD>
    <META NAME="GENERATOR " CONTENT="FD Mavica">
    <SCRIPT language=JavaSc ript>
    function showpix() {
    i = 1;
    while i<32 {
    if (i<10) {
    document.write( i + ' <A HREF="MVC-00' + i +'S.JPG"><img src="MVC-00'
    + i +'S.JPG" width=100 height=74></A><BR>'); }
    else {
    document.write( i +' <A HREF="MVC-0' + i +'S.JPG"><img src="MVC-0' +
    i +'S.JPG" width=100 height=74></A><BR>'); }
    i+=1;
    }
    }
    </SCRIPT>
    <BODY>
    <P><BIG><B>FD Mavica images</B></BIG>
    <PRE>
    <HR>
    <OL>
    <SCRIPT>showpix ()</SCRIPT>
    </OL>
    </PRE>
    </BODY>
    </HTML>
  • Lee

    #2
    Re: Document.Write Doesn't

    Tom said:[color=blue]
    >
    >Since the Sony camera saves images with a set name convention, I would
    >like the following program to create an on the fly listing of the
    >images in the directory. Any help is appreciated!
    >
    ><HTML>
    ><HEAD><TITLE>F D Mavica image viewer</TITLE></HEAD>
    ><META NAME="GENERATOR " CONTENT="FD Mavica">
    ><SCRIPT language=JavaSc ript>
    >function showpix() {
    >i = 1;
    >while i<32 {[/color]

    while (i<32) {

    Comment

    • Tom

      #3
      Re: Document.Write Doesn't

      Lee <REM0VElbspamtr ap@cox.net> wrote in message news:<blv5vp01g 64@drn.newsguy. com>...[color=blue]
      > while (i<32) {[/color]

      Yahoo! That worked! Thanks!!!

      Comment

      • Dr John Stockton

        #4
        Re: Document.Write Doesn't

        JRS: In article <1fa82384.03100 71148.2315f016@ posting.google. com>, seen
        in news:comp.lang. javascript, Tom <tcosmas@netzer o.com> posted at Tue, 7
        Oct 2003 12:48:14 :-
        [color=blue]
        >if (i<10) {
        > document.write( i + ' <A HREF="MVC-00' + i +'S.JPG"><img src="MVC-00'
        >+ i +'S.JPG" width=100 height=74></A><BR>'); }
        > else {
        > document.write( i +' <A HREF="MVC-0' + i +'S.JPG"><img src="MVC-0' +
        >i +'S.JPG" width=100 height=74></A><BR>'); }[/color]

        Write LZ(i) instead of i, and only one document.write will be needed.

        See <URL:http://www.merlyn.demo n.co.uk/js-round.htm>, and use

        function LZ(x) {return(x<0||x> 9?"":"0")+x}

        --
        © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
        <URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang. javascript
        <URL:http://www.merlyn.demo n.co.uk/js-index.htm> JS maths, dates, sources.
        <URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.

        Comment

        Working...