rejetto forum

File list

Alons0 · 3 · 1932

0 Members and 1 Guest are viewing this topic.

Offline Alons0

  • Tireless poster
  • ****
    • Posts: 197
    • View Profile
    • Alons0's site
I use "File List Recursive" only in the folders with this java script:
Code: [Select]
<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?


Offline Giant Eagle

  • Tireless poster
  • ****
    • Posts: 535
  • >=3 RAWR!
    • View Profile
    • RAWR-Designs.com
I use "File List Recursive" only in the folders with this java script:
Code: [Select]
<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:

Code: [Select]
<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.


Offline Alons0

  • Tireless poster
  • ****
    • Posts: 197
    • View Profile
    • Alons0's site
@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