rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: Alons0 on June 26, 2007, 05:45:46 PM
-
I use "File List Recursive" only in the folders with this java script:
<script type="text/javascript" language="javascript">document.write("%folder%" != "/" ? "<a href=\"~files.lst?recursive\" target=\"_blank\"><font color=blue>*File list*</font></a>" : "");</script>
And I wanna use "File List" (links of the all files) only for root directory. Can somebody write a sript for this?
-
I use "File List Recursive" only in the folders with this java script:
<script type="text/javascript" language="javascript">document.write("%folder%" != "/" ? "<a href=\"~files.lst?recursive\" target=\"_blank\"><font color=blue>*File list*</font></a>" : "");</script>
And I wanna use "File List" (links of the all files) only for root directory. Can somebody write a sript for this?
you know that this method is far from water proof? If someone writes '?recursive' in the address bar whilst browsing the root, they still get a recursive listing..
anyway.. you just need to finish your script:
<script type="text/javascript" language="javascript">document.write("%folder%" != "/" ? "<a href=\"~files.lst?recursive\" target=\"_blank\"><font color=blue>*File list*</font></a>" : "<a href=\"~files.lst\" target=\"_blank\"><font color=blue>*File list*</font></a>");</script>
everything behind ? is triggered when the given condition is true and everything behind : is triggered when the given condition is false. IF - THEN - ELSE.
-
@Giant Eagle for root i edited link to ~files.lst?recursive because ~files.lst opens blank page. And so for root and for folders is ~files.lst?recursive so i think i don't need of java scripts (just link). ::) ;D