how to reload javascript page with new values which are read by an asp so that my page can act accordingly. <br><br>Thank<br>yogesh <br><br><br> <br>
eh, you know you could just add that to the end of your already existing post( calling vbscript from javascript ). <br><br>but here is a simple example, which may only work in IE. (the fact that it dynamically changes the Form)<br>you may not need to do it exactly like I did, but take note in how you use a <FORM> tag to post information to an ASP and how the ASP grabs that information.<br><br><FONT FACE=monospace><br><%@ Language=VBScript %><br><HTML><br><HEAD><br> <Title>ActiveX Navigator</Title><br> <Script Language="JavaScript"><br> <!--<br> function Go(thePath)<br> {<br> DrvFrm.Path.value = thePath;<br> DrvFrm.submit();<br> }<br> --><br> </Script><br></HEAD><br><BODY><br><Form name="DrvFrm" action="DriveNav.asp" method="post" target="_display"><br> <input type="hidden" name="Path"><br></Form><br><%<br>Set fs = Server.CreateObject("Scripting.FileSystemObject"<br><br>If not IsEmpty(Request.Form("Path") and Request.Form("Path" <> "Root" then<br> Path = Request.Form("Path"<br> set Compon = Server.CreateObject("WsUtil.Componets"<br> Dim Temp, GetVersion<br> if fs.FolderExists(Path) then<br> Set fsFol = fs.GetFolder(Path)<br> Set fsSub = fsFol.SubFolders<br> Set fsFiles = fsFol.Files<br> <br> %> <Table border=1 width="100%" align="center"> <br> <TH bgcolor=Black colspan=8><Font color=White><%=Path%></FONT></TH><br> <TR bgcolor=Silver><br> <TD>FileName/Directory</TD><br> <TD>Structure Version</TD><br> <TD>File Version</TD><br> <TD>Product Version</TD><br> <TD>File Flags</TD><br> <TD>File OS</TD><br> <TD>File Type</TD><br> <TD>File SubType</TD><br> </TR><br> <% Response.Write vbcrlf<br> if fsFol.IsRootFolder = False then<br> therpath = replace(fsFol.ParentFolder,"\", "\\"<br> %> <TR> <%=vbcrlf & vbtab%><br> <TD onclick="Go('<%=therpath%>')" bgcolor=#20b2aa><IMG SRC="images/Folder.jpg" width=16 height=16>..</TD><%=vbcrlf & vbtab%><br> <TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><% Response.Write vbcrlf<br> %></TR><% Response.Write vbcrlf<br> else<br> %> <TR> <%=vbcrlf & vbtab%> <br> <TD onclick="Go('Root')" bgcolor=#20b2aa><IMG SRC="images/Folder.jpg" width=16 height=16>..</TD><%=vbcrlf & vbtab%><br> <TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><% Response.Write vbcrlf<br> %></TR><% Response.Write vbcrlf<br> end if<br> For Each fol in fsSub<br> thepath = replace(fol.path,"\", "\\"<br> %><TR><%=vbcrlf & vbTab%><br> <TD onclick="Go('<%=thepath%>')" bgcolor=#20b2aa> <IMG SRC="images/Folder.jpg" width=16 height=16> <%=fol.name%> </TD> <%=vbcrlf & vbtab%><br> <TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><%=vbcrlf%><br> </TR><% Response.Write vbcrlf<br> next<br> For each fsFile in fsFiles<br> ObjectPath = fsFile.path<br> FileExt = fs.GetExtensionName(ObjectPath)<br> If LCase(FileExt) = "dll" or LCase(FileExt) = "ocx" or LCase(FileExt) = "exe" then<br> %> <TR> <%<br> %> <TD bgcolor=#20b2aa> <%=fsFile.name%> </TD> <%<br> if Compon.VersionInfo(fsFile.path,Temp) then<br> GetVersion = Split(Temp,vbNullChar)<br> for j = LBound(GetVersion) to UBound(GetVersion)<br> %> <TD> <%=GetVersion(j)%> </TD> <%<br> next<br> else<br> %> <TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD> <%<br> end if<br> %> </TR> <%<br> end if<br> next<br> %> </Table> <%<br> Else<br> %> <br> <Font color=Red size=+2> Path does not exist or is not ready, <BR> press the button to goto the root menu. </Font></BR><br> <INPUT type="button" value="Root Path" id=button1 name=button1 onclick="Go('Root')"><br> <%<br> end if<br>else<br> Dim d, dc, s, n<br><br> Set dc = fs.Drives<br> %> <br> <Table border=1 width="100%" align="center"> <br> <%=vbcrlf%><br> <TH bgcolor=Black colspan=2><Font color=White> Root </FONT></TH><br> <%<br> Response.Write vbcrlf<br> For Each d in dc<br> %> <TR> <%<br> Response.Write vbcrlf<br> s = d.DriveLetter<br> If d.DriveType = 3 Then<br> n = d.ShareName<br> ElseIf d.IsReady Then<br> n = d.VolumeName<br> End If<br> GoCommand = "Go('" & s & ":\\')"<br> Response.Write vbtab<br> %> <TD onclick="<%=GoCommand%>"><%=s%></TD><%<br> %> <TD><%=n%> </TD><%=vbcrlf%> </TR> <%<br> Response.Write vbcrlf<br> Next<br> %> </Table> <%<br>end if<br>%><br><br></BODY><br></HTML><br></font><br><br>you may have to stick it into notepad and indent it a bit to see the flow of the code, wish Tek-tips would take tabs as well.<br><br>Hope this helps. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href=
</a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.