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="VBScript">
Sub Browse_OnClick
Set shell = CreateObject("Shell.Application"
Set bestand = shell.BrowseForFolder(0,"Selecteer een bestand.","&H4010","C:\"
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 "Zoekpad: " & zoekpad
Set iverkenner = CreateObject("InternetExplorer.Application"
iverkenner.Visible=True
iverkenner.Navigate(zoekpad)
End Sub
</script>
</head>
<body onload='start(this.name,"groot"
' onResize="winResize()" bgcolor="lemonchiffon">
<form name="album">
<table border="0" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" width="100%" id="main">
<tr>
<td width="160">
<table border="0" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" width="160" id="default">
<tr><td width="160"><center>(c) Koos Pater
</center></td></tr>
<tr><td width="160"><center><i>versie: 10.0
</i></center></td></tr>
<tr><td width="160"><center>
<input type=button value="Browse" onclick="handleiding()" id=Browse name=info style="COLOR: black; BACKGROUND-COLOR: lightsalmon">
</center></td></tr>
<tr><td width="160"><center> </center></td></tr>
<tr><td width="160"><center>Jaar: Maand:</center></td></tr>
<tr><td width="160"><center>
<select name="jaar" size="12" onChange="changeImage(document.mini01.name,'groot')">
<option value="Euro" selected>Euro
<option value="2004">2004
<option value="2005">2005
<option value="2006">2006
<option value="2007">2007
<option value="2008">2008
<option value="2009">2009
<option value="2010">2010
</option></select>
<select name="maand" size="12" onChange="changeImage(document.mini01.name,'groot')">
<option value="01" selected>01
<option value="02">02
<option value="03">03
<option value="04">04
</option>
</select></center></td></tr>
<tr><td width="160"> </td></tr>
<tr><td width="160"><center>
<input value="0001-01-01.jpg" name="bestand" size="15" onfocus="blur()" style="TEXT-ALIGN: right">
</center></td></tr>
<tr><td width="160"><center>
<input name="kilobytes" size="15" onfocus="blur()" style="TEXT-ALIGN: right">
</center></td></tr>
<tr><td width="160"><center>
<input type=button value="Next" onclick="next()" style="COLOR: black; BACKGROUND-COLOR: lightsalmon">
</center></td></tr>
<tr><td width="160"> </td></tr>
</table>
<td width="640">
<IMG onclick='FullSize(this.name,"groot"
;' height=480 alt="" src="0001/0001-01-01.jpg" border=2
name=groot >
</td>
<tr></tr>
</table>
</form>
</body>
</html>
Why does the MSGBOX with "zoekpad" not appear with the correct path?
<html>
<head>
<title>Digitale foto album (mini & maxi & full)</title>
<script language="VBScript">
Sub Browse_OnClick
Set shell = CreateObject("Shell.Application"
Set bestand = shell.BrowseForFolder(0,"Selecteer een bestand.","&H4010","C:\"
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 "Zoekpad: " & zoekpad
Set iverkenner = CreateObject("InternetExplorer.Application"
iverkenner.Visible=True
iverkenner.Navigate(zoekpad)
End Sub
</script>
</head>
<body onload='start(this.name,"groot"
<form name="album">
<table border="0" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" width="100%" id="main">
<tr>
<td width="160">
<table border="0" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" width="160" id="default">
<tr><td width="160"><center>(c) Koos Pater
</center></td></tr>
<tr><td width="160"><center><i>versie: 10.0
</i></center></td></tr>
<tr><td width="160"><center>
<input type=button value="Browse" onclick="handleiding()" id=Browse name=info style="COLOR: black; BACKGROUND-COLOR: lightsalmon">
</center></td></tr>
<tr><td width="160"><center> </center></td></tr>
<tr><td width="160"><center>Jaar: Maand:</center></td></tr>
<tr><td width="160"><center>
<select name="jaar" size="12" onChange="changeImage(document.mini01.name,'groot')">
<option value="Euro" selected>Euro
<option value="2004">2004
<option value="2005">2005
<option value="2006">2006
<option value="2007">2007
<option value="2008">2008
<option value="2009">2009
<option value="2010">2010
</option></select>
<select name="maand" size="12" onChange="changeImage(document.mini01.name,'groot')">
<option value="01" selected>01
<option value="02">02
<option value="03">03
<option value="04">04
</option>
</select></center></td></tr>
<tr><td width="160"> </td></tr>
<tr><td width="160"><center>
<input value="0001-01-01.jpg" name="bestand" size="15" onfocus="blur()" style="TEXT-ALIGN: right">
</center></td></tr>
<tr><td width="160"><center>
<input name="kilobytes" size="15" onfocus="blur()" style="TEXT-ALIGN: right">
</center></td></tr>
<tr><td width="160"><center>
<input type=button value="Next" onclick="next()" style="COLOR: black; BACKGROUND-COLOR: lightsalmon">
</center></td></tr>
<tr><td width="160"> </td></tr>
</table>
<td width="640">
<IMG onclick='FullSize(this.name,"groot"
name=groot >
</td>
<tr></tr>
</table>
</form>
</body>
</html>