please verivy this code

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

    please verivy this code

    Can u please verify if this code works on a MAC and or PC?

    test.htm?hello. jpg ( should see save thing on PC and MAC)
    test.htm?hello. png ( should see save thing on PC and MAC)
    test.htm?hello. ppt ( should see save thing on PC but not on MAC)
    test.htm?hello. pdf ( shouldn't see save thing on PC and MAC)
    test.htm?hello. doc ( shouldn't see save thing on PC and MAC)


    tnx


    /// TEST.HTM ///
    document.write( '<table>')
    var save = (location.searc h ? location.search .substring(1) : '');
    var notmac = navigator.userA gent.indexOf("M ac")==-1
    if (notmac && save.indexOf(". ppt") >= 0 || save.indexOf(". png") >= 0 ||
    save.indexOf(". jpg") >= 0)
    {
    // PC
    document.write( '<tr valign="middle" align="left">')
    document.write( '<td colspan="2"><br ></td>')
    document.write( '</tr>')
    document.write( '<tr valign="middle" align="left">')
    document.write( '<td height="32"><im g src="../../images/dot.gif" width="32"
    height="1" alt="" border="0"><a href="../../images/ap/' + save + '"
    target="_new" class="nav"><im g src="../../images/save.gif" width="32"
    height="32" alt="" border="0"></a></td><td>&nbsp;&n bsp;<a
    href="../../images/ap/' + save + '" target="_new" class="nav">Kli k
    rechtermuisknop om te bewaren</a></td>')
    document.write( '</tr>')
    }
    else if (save.indexOf(" .png") >= 0 || save.indexOf(". jpg") >= 0)
    {
    // MAC
    document.write( '<tr valign="middle" align="left">')
    document.write( '<td colspan="2"><br ></td>')
    document.write( '</tr>')
    document.write( '<tr valign="middle" align="left">')
    document.write( '<td height="32"><im g src="../../images/dot.gif" width="32"
    height="1" alt="" border="0"><a href="../../images/ap/' + save + '"
    target="_new" class="nav"><im g src="../../images/save.gif" width="32"
    height="32" alt="" border="0"></a></td><td>&nbsp;&n bsp;<a
    href="../../images/ap/' + save + '" target="_new" class="nav">"CT RL" +
    rechtermuisknop om te bewaren</a></td>')
    document.write( '</tr>')
    }
    else {}
    document.write( '</table>')


  • nice.guy.nige

    #2
    Re: please verivy this code

    While the city slept, ziemon <news@ziemon.nl > feverishly typed:
    [color=blue]
    > var notmac = navigator.userA gent.indexOf("M ac")==-1
    > if (notmac && save.indexOf(". ppt") >= 0 || save.indexOf(". png") >= 0[/color]

    What happens if I am using a *nix machine? Or any of the other many and
    varied non-windows/non-mac OS's out there?

    Cheers,
    Nige

    --
    Nigel Moss.

    Email address is not valid. nigel@nigenetDO G.org.uk. Take the dog out!
    http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
    "How strange the change from major to minor..."


    Comment

    • ziemon

      #3
      Re: please verivy this code

      IF the code works and if it's not mac u should see the picture ( which is
      not there ) and some txt at "file.ppt" "file.png" and "file.jpg"


      "nice.guy.n ige" <nigel_moss@dea dspam.com> wrote in message
      news:bjobg3$lh5 tb$1@ID-112325.news.uni-berlin.de...[color=blue]
      > While the city slept, ziemon <news@ziemon.nl > feverishly typed:
      >[color=green]
      > > var notmac = navigator.userA gent.indexOf("M ac")==-1
      > > if (notmac && save.indexOf(". ppt") >= 0 || save.indexOf(". png") >= 0[/color]
      >
      > What happens if I am using a *nix machine? Or any of the other many and
      > varied non-windows/non-mac OS's out there?
      >
      > Cheers,
      > Nige
      >
      > --
      > Nigel Moss.
      >
      > Email address is not valid. nigel@nigenetDO G.org.uk. Take the dog out!
      > http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
      > "How strange the change from major to minor..."
      >
      >[/color]


      Comment

      Working...