View Full Version : using iFrames to view folder contents

03-19-2009, 07:17 AM
Hi There,
Good day to all geeks !
Kindly check and advice the following.

I am using the below code to read and disply folder contents to html.

<script type="text/javascript">
function callcontents(foldername)
parent.document.getElementById('Bottom').src = 'bott.php?FolerName=' + foldername

<a href="javascript:void(0);" target="iFrame1" onClick="callcontents('public_html/folder1'); return false"'>Click to View Folder 1 Contents</a>

the script is working fine.
its not in oder, i need to know how to sort ascending order, desc or by modified order of all files.

Kindly advice
Thanks with anticipation


Philip M
03-19-2009, 09:21 AM
Have a look at the Javascript sort() method.


"Possession of the ball is now nine-tenths of the law". - Football commentator.