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> &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> &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>')
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> &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> &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>')
Comment