Announcement

Collapse
No announcement yet.

norman

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    norman

    is it posable to make your rotating image patch diplay background images,
    and could you put the second call script in a table in a fragment...?
    Gary Simpson
    www.tba
    Replacement blades, drills and cutters for your power tools.....

    #2
    What post does this refer to?
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      hi again

      this one

      first script

      <script language=JavaScript>
      var cvimages=new Array('CUSTOMVAR:IMAGE1','CUSTOMVAR:IMAGE2','CUSTOMVAR:IMAGE3','CUSTOMVAR:IMAGE4','CUSTOMVAR:IMAGE5',
      'CUSTOMVAR:IMAGE6','CUSTOMVAR:IMAGE7','CUSTOMVAR:IMAGE8','CUSTOMVAR:IMAGE9','CUSTOMVAR:IMAGE10');
      var cvlinks=new Array('CUSTOMVAR:LINK1','CUSTOMVAR:LINK2','CUSTOMVAR:LINK3','CUSTOMVAR:LINK4','CUSTOMVAR:LINK5',
      'CUSTOMVAR:LINK6','CUSTOMVAR:LINK7','CUSTOMVAR:LINK8','CUSTOMVAR:LINK9','CUSTOMVAR:LINK10');
      var images=new Array();
      var links=new Array();
      for (var i=0; i < cvimages.length; i++) { if (cvimages[i] != '') { images.push(cvimages[i]); links.push(cvlinks[i]); } }
      idx = Math.floor(Math.random()*images.length - 0.01);
      showlink = (links[idx] != '');
      </script>

      second script
      <script language=JavaScript>
      <!--
      if (showlink) document.write('<a href="' + links[idx] + '">');
      document.write('<img border=0 src="' + images[idx] + '">');
      if (showlink) document.write('<\a>');
      //-->
      </script>
      Gary Simpson
      www.tba
      Replacement blades, drills and cutters for your power tools.....

      Comment


        #4
        Replace your e.g. <td background="default.jpg">

        with

        <script language=JavaScript>
        <!--
        document.write('<td background="' + images[idx] + '">');
        //-->
        </script>
        <noscript><td background="default.jpg"></noscript>


        (the noscript stuff makes sure that valid HTML is output for nan-JavaScript browsers)


        To put the enture lot in a Fragment (or Product) description just surround it with !!< and >!!

        e.g.

        !!<<script language=JavaScript>
        <!--
        document.write('<td background="' + images[idx] + '">');
        //-->
        </script>
        <noscript><td background="default.jpg"></noscript>>!!
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          ok

          is this ok

          !!<<table>
          <tr>
          <td align="right"<img src="whatever">
          <script language=JavaScript>
          <!--
          document.write('<td background="' + images[idx] + '">');
          //-->
          </script>
          <noscript><td background="default.jpg"></noscript>
          </td>
          </tr>
          </table>>!!
          Gary Simpson
          www.tba
          Replacement blades, drills and cutters for your power tools.....

          Comment


            #6
            No. The line <td align="right"<img src="whatever">

            is wrong (no closing > on the TD) and redundant - I thought you wanted a background image. Remove that entire line.

            The best way is to try it and see. Use Firefox for testing as it's Tools / JavaScript Console will help show coding errors.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              i do want rotating images in back ground but need a normal image on top to the right this is the image clear with two white corners for the sizeing issue,
              wide screens are designed for but regular screens loose right of image but corners still remain rounded
              Gary Simpson
              www.tba
              Replacement blades, drills and cutters for your power tools.....

              Comment


                #8
                Then use my code for the <td> and put your smaller image immediately after my code.

                !!<<table>
                <tr>
                <script language=JavaScript>
                <!--
                document.write('<td background="' + images[idx] + '">');
                //-->
                </script>
                <noscript><td background="default.jpg"></noscript>
                <img src="whatever.jpg">
                </td>
                </tr>
                </table>>!!
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment

                Working...
                X