Note that there are some explanatory texts on larger screens.

plurals
  1. POTreeView in all browsers using JQuery instead of VBScript in ActiveX Control
    primarykey
    data
    text
    <p>There is a TreeView which our team has been using now for three or four years which provides our Internet Explorer users the ability to simply view data from both an MS Access database and MSSQL 2005 Server in one TreeView list. </p> <p>Since the development of this, we have a dilemma forming. The users are beginning to be allowed to use Google Chrome and Firefox which was not included in the original use case and are not compatible with the TreeView ActiveX control this object is coded in outside of Internet Explorer. I believe the original idea for this came from <a href="http://www.codeproject.com/KB/vbscript/GUI_JScript_VBScript.aspx?display=Print" rel="nofollow noreferrer">this type of Windows Common Control</a>.</p> <p><strong>What would be a simple alternative to making this possible using <a href="http://jquery.com/" rel="nofollow noreferrer">JQuery</a> or another technology provided the current constraint of having no server side scripting available</strong>?</p> <p>Again, the aim here is to make it compatible with most of the major browsers. </p> <p>Note: I have attempted to get server side scripting available and this is not an option for this project. So, answers should <em>not</em> target using <code>JSP</code>, <code>PHP</code>, <code>ASP</code>, etc... Instead the attempt here is to figure out a way to do this <strong>using a local file on a shared network</strong>. </p> <p>And yes, I know the security vulnerabilities involved in this type of setup... regardless, this has been the direction.</p> <p>For example, here is the object in use:</p> <pre><code> &lt;body onload="SetupPage()"&gt; &lt;object classid="CLSID:C74190B6-8589-11D1-B16A-00C0F0283628" id="MainTree" width="100%" height="290" style="font-family: times new roman; font-size: 16px; Visibility: visible"&gt; &lt;param name="Style" value="7"&gt; &lt;param name="_ExtentX" value="5292"&gt; &lt;param name="_ExtentY" value="10583"&gt; &lt;param name="_Version" value="393217"&gt; &lt;param name="HideSelection" value="0"&gt; &lt;param name="Indentation" value="767"&gt; &lt;param name="LabelEdit" value="0"&gt; &lt;param name="LineStyle" value="1"&gt; &lt;param name="PathSeparator" value="\"&gt; &lt;param name="Sorted" value="0"&gt; &lt;param name="Checkboxes" value="0"&gt; &lt;param name="FullRowSelect" value="0"&gt; &lt;param name="HotTracking" value="1"&gt; &lt;param name="Scroll" value="1"&gt; &lt;param name="SingleSel" value="0"&gt; &lt;param name="ImageList" value="ImgList"&gt; &lt;param name="BorderStyle" value="1"&gt; &lt;param name="Appearance" value="1"&gt; &lt;param name="MousePointer" value="0"&gt; &lt;param name="Enabled" value="1"&gt; &lt;param name="OLEDragMode" value="0"&gt; &lt;param name="OLEDropMode" value="0"&gt; &lt;/object&gt; &lt;object classid="CLSID:2C247F23-8591-11D1-B16A-00C0F0283628" id="ImgList" width="0" height="0" style="visibility: hidden"&gt;&lt;/object&gt; &lt;IFrame id="PrtFrame" style="width: 0px; height: 0px"&gt; &lt;/IFRAME&gt; &lt;/body&gt; </code></pre> <p>After this object is placed in the body of the web page a call to some VBScript allows for populating this object using something like the following:</p> <pre><code> &lt;script language="vbscript"&gt; Sub SetupPage() Call MainTree.Nodes.Clear Call PopulateImageList Call PopulateTree End Sub Sub PopulateTree() Dim rs ' RecordSet Dim i ' Index Dim ndParent ' Parent Node ' Assign the main html form to a variable xfrm Set xfrm = document.MainForm ' Setup a connection with the Database Set AccessConn = CreateObject("ADODB.Connection") AccessConn.open AccessConnectionString strSQL = "SELECT..." Set rs = AccessConn.Execute(strSQL) ' Manually set the parent nodes i = 1 Set ndActive = MainTree.Nodes.Add(, 2, "IDC" &amp; i, "Active", ImageIndex("active")) ' Move one forward, since the parent node was set manually i = i + 1 Do While rs.EOF = False ' Add the detail to each parent node for each record returned... rs.MoveNext Loop ' etc... End Sub Sub PopulateImageList() Dim lst set lst = ImgList.ListImages.Add(1,"header",LoadPicture(DirectoryPath &amp; "TreeImages\header.gif")) set lst = ImgList.ListImages.Add(2,"hold",LoadPicture(DirectoryPath &amp; "TreeImages\hold.gif")) set lst = ImgList.ListImages.Add(3,"reviewed",LoadPicture(DirectoryPath &amp; "TreeImages\reviewed.gif")) set lst = ImgList.ListImages.Add(4,"completed",LoadPicture(DirectoryPath &amp; "TreeImages\completed.gif")) set lst = ImgList.ListImages.Add(5,"rejected",LoadPicture(DirectoryPath &amp; "TreeImages\rejected.gif")) set lst = ImgList.ListImages.Add(6,"printed",LoadPicture(DirectoryPath &amp; "TreeImages\printer.gif")) set lst = ImgList.ListImages.Add(7,"active",LoadPicture(DirectoryPath &amp; "TreeImages\active.gif")) set lst = ImgList.ListImages.Add(8,"archived",LoadPicture(DirectoryPath &amp; "TreeImages\archived.gif")) set lst = ImgList.ListImages.Add(9,"emailed",LoadPicture(DirectoryPath &amp; "TreeImages\emailed.gif")) set lst = ImgList.ListImages.Add(10,"assigned",LoadPicture(DirectoryPath &amp; "TreeImages\assigned.gif")) End Sub &lt;/script&gt; </code></pre> <p>Once data is available in the source database, all the user needs to do is open the local file on the shared network and they see something like the following: <img src="https://i.stack.imgur.com/BjLSX.gif" alt="TreeView Picture Example"></p> <p>Any ideas or methods for accomplishing this would be greatly appreciated. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload