944,045 Members | Top Members by Rank

Ad:
May 15th, 2007
0

scanning files in a spec folder

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
prophetboy is offline Offline
2 posts
since May 2007
May 22nd, 2007
0

Re: scanning files in a spec folder

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:

Quote ...
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.
Reputation Points: 20
Solved Threads: 5
Junior Poster
alpha_foobar is offline Offline
182 posts
since May 2005
May 24th, 2007
0

Re: scanning files in a spec folder

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
prophetboy is offline Offline
2 posts
since May 2007
May 24th, 2007
0

Re: scanning files in a spec folder

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.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
May 24th, 2007
0

Re: scanning files in a spec folder

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.
Reputation Points: 20
Solved Threads: 5
Junior Poster
alpha_foobar is offline Offline
182 posts
since May 2005
May 25th, 2007
0

Re: scanning files in a spec folder

Use VB or Perl to do things on your own computer.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Nov 27th, 2009
0
Re: scanning files in a spec folder
hi...
I too had the same problem.But you message worked good..
Let me explain about the TWAIN and OCR.


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:



These will work when you are testing on your computer at home, but not when you publish to the web.

Cheers.
Last edited by Ezzaral; Nov 30th, 2009 at 1:24 pm. Reason: Snipped url. Keep it on site.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
johnvarenda is offline Offline
2 posts
since Nov 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: local varibles messing up function
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: simplifying separate functions to one function while using json and dojo?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC