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

Recommended Answers

All 6 Replies

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.

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

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.

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.

Use VB or Perl to do things on your own computer.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.