scanning files in a spec folder

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: May 2007
Posts: 2
Reputation: prophetboy is an unknown quantity at this point 
Solved Threads: 0
prophetboy prophetboy is offline Offline
Newbie Poster

scanning files in a spec folder

 
0
  #1
May 15th, 2007
Hi everyone
I'm more than a little stuck and would appreciate a hint. I'm struggling to read files in a folder and then pass the variable to the following:

</body>

<OBJECT ID="MediaPlayer" width=320 height=310 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject">
<PARAM NAME="FileName" VALUE="video/RC Radio Controlled Model Airplane [from].wmv">
<PARAM NAME="AutoStart" Value="false">
<PARAM NAME="ShowControls" VALUE="true">
<PARAM NAME="ShowStatusBar" VALUE="false">
<PARAM NAME="Enabled" VALUE="true">
</OBJECT>

<FORM name="MediaForm">
<SELECT NAME="VidChange" onChange="{document.MediaPlayer.FileName = document.MediaForm.VidChange.options[document.MediaForm.VidChange.selectedIndex].value}">
<OPTION VALUE="video/RC Radio Controlled Model Airplane [from].wmv">RC radio plane flick
<OPTION VALUE="C:\Desktop special\leftmenu\video\intro.wmv">Intro
</SELECT>
Loop:
<INPUT TYPE="checkbox" NAME="VidRepeat" onClick="{if ( document.forms.MediaForm.VidRepeat.checked == true){document.MediaPlayer.PlayCount = 999}else {document.MediaPlayer.PlayCount = 1 }}">
</FORM>
</body>

I just learning scripting languages...really it's all new to me.
Thanks very much

Prophetboy
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 182
Reputation: alpha_foobar is an unknown quantity at this point 
Solved Threads: 3
alpha_foobar's Avatar
alpha_foobar alpha_foobar is offline Offline
Junior Poster

Re: scanning files in a spec folder

 
0
  #2
May 22nd, 2007
You can't do this with a HTML scripting language.

If you use a server side language - something like JSP, ASP, PHP etc, then you can scan the server directories and populate a list in the webpage.

Also, remember to use web URL paths and not filesystem paths:

C:\Desktop special\leftmenu\video\intro.wmv
These will work when you are testing on your computer at home, but not when you publish to the web.

Cheers.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 2
Reputation: prophetboy is an unknown quantity at this point 
Solved Threads: 0
prophetboy prophetboy is offline Offline
Newbie Poster

Re: scanning files in a spec folder

 
0
  #3
May 24th, 2007
Thanks for replying but I think I stated my intentions poorly. What I want to do is scan a folder for specific files (on my own computer) and then put them in a list box as a selection. I'm putting this page on my desktop as a web page. I'm trying to use a scripting language such as JavaScript to read the files from a selection.

I tried to use this to read a fold but I couldn't get it to work for me.
http://www.codeproject.com/jscript/RenameAllFiles.asp

The next is a copy of the original project I found and was endeavoring to change.
http://www.codeproject.com/jscript/leftmenu.asp

you will see on the left menu there are selections. I want to be able to select one and have a media play show a list box show the videos in the folder.

Right now I live in China and can't run to the store to buy English books and I've looked on the net but I'm not having a lot of luck finding the material.

can you help

Chad
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,203
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 164
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: scanning files in a spec folder

 
0
  #4
May 24th, 2007
Scripting languages are generally prohibited from searching a computer outside the web page environment for security reasons

I have written such a function in Visual Basic.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 182
Reputation: alpha_foobar is an unknown quantity at this point 
Solved Threads: 3
alpha_foobar's Avatar
alpha_foobar alpha_foobar is offline Offline
Junior Poster

Re: scanning files in a spec folder

 
0
  #5
May 24th, 2007
It is possible to run applications on the client machine, but this is usually not appreciated by the user and involves signing trusted code.

A better alternative may be to request the client user to browse their computer for a file they want to load.

Unless this is only meant to be for your use.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,203
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 164
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: scanning files in a spec folder

 
0
  #6
May 25th, 2007
Use VB or Perl to do things on your own computer.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC