Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BrowseForFolders does not work

Status
Not open for further replies.

koospater

Programmer
Jul 6, 2003
5
0
0
NL
I have a script called browsing.vbs and it works correctly. But when I integrated it into a html-page then there is going something wrong.
Why does the MSGBOX with "zoekpad" not appear with the correct path?

<html>
<head>
<title>Digitale foto album (mini & maxi & full)</title>

<script language=&quot;VBScript&quot;>
Sub Browse_OnClick
Set shell = CreateObject(&quot;Shell.Application&quot;)
Set bestand = shell.BrowseForFolder(0,&quot;Selecteer een bestand.&quot;,&quot;&H4010&quot;,&quot;C:\&quot;)
Set shell = Nothing
Set ouder = bestand.ParentFolder
Set mapitems = ouder.items
For Each item in mapitems
If item.Name = bestand.Title Then
zoekpad = item.Path
End If
Next
MsgBox &quot;Zoekpad: &quot; & zoekpad
Set iverkenner = CreateObject(&quot;InternetExplorer.Application&quot;)
iverkenner.Visible=True
iverkenner.Navigate(zoekpad)
End Sub
</script>

</head>
<body onload='start(this.name,&quot;groot&quot;)' onResize=&quot;winResize()&quot; bgcolor=&quot;lemonchiffon&quot;>
<form name=&quot;album&quot;>

<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;BORDER-COLLAPSE: collapse&quot; bordercolor=&quot;#111111&quot; width=&quot;100%&quot; id=&quot;main&quot;>
<tr>
<td width=&quot;160&quot;>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;BORDER-COLLAPSE: collapse&quot; bordercolor=&quot;#111111&quot; width=&quot;160&quot; id=&quot;default&quot;>

<tr><td width=&quot;160&quot;><center>(c) Koos Pater
</center></td></tr>
<tr><td width=&quot;160&quot;><center><i>versie: 10.0
</i></center></td></tr>
<tr><td width=&quot;160&quot;><center>
<input type=button value=&quot;Browse&quot; onclick=&quot;handleiding()&quot; id=Browse name=info style=&quot;COLOR: black; BACKGROUND-COLOR: lightsalmon&quot;>
</center></td></tr>
<tr><td width=&quot;160&quot;><center>&nbsp;</center></td></tr>
<tr><td width=&quot;160&quot;><center>Jaar: &nbsp; &nbsp; Maand:</center></td></tr>
<tr><td width=&quot;160&quot;><center>
<select name=&quot;jaar&quot; size=&quot;12&quot; onChange=&quot;changeImage(document.mini01.name,'groot')&quot;>
<option value=&quot;Euro&quot; selected>Euro
<option value=&quot;2004&quot;>2004
<option value=&quot;2005&quot;>2005
<option value=&quot;2006&quot;>2006
<option value=&quot;2007&quot;>2007
<option value=&quot;2008&quot;>2008
<option value=&quot;2009&quot;>2009
<option value=&quot;2010&quot;>2010
</option></select>
<select name=&quot;maand&quot; size=&quot;12&quot; onChange=&quot;changeImage(document.mini01.name,'groot')&quot;>
<option value=&quot;01&quot; selected>01
<option value=&quot;02&quot;>02
<option value=&quot;03&quot;>03
<option value=&quot;04&quot;>04
</option>
</select></center></td></tr>
<tr><td width=&quot;160&quot;>&nbsp;</td></tr>
<tr><td width=&quot;160&quot;><center>
<input value=&quot;0001-01-01.jpg&quot; name=&quot;bestand&quot; size=&quot;15&quot; onfocus=&quot;blur()&quot; style=&quot;TEXT-ALIGN: right&quot;>
</center></td></tr>
<tr><td width=&quot;160&quot;><center>
<input name=&quot;kilobytes&quot; size=&quot;15&quot; onfocus=&quot;blur()&quot; style=&quot;TEXT-ALIGN: right&quot;>
</center></td></tr>
<tr><td width=&quot;160&quot;><center>
<input type=button value=&quot;Next&quot; onclick=&quot;next()&quot; style=&quot;COLOR: black; BACKGROUND-COLOR: lightsalmon&quot;>
</center></td></tr>
<tr><td width=&quot;160&quot;>&nbsp;</td></tr>
</table>
<td width=&quot;640&quot;>
<IMG onclick='FullSize(this.name,&quot;groot&quot;);' height=480 alt=&quot;&quot; src=&quot;0001/0001-01-01.jpg&quot; border=2
name=groot >
</td>
<tr></tr>
</table>
</form>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top