title: calling javascript function from vbscript
body: <p>Writing an hta application to load data from a php based web page to oracle form. Need to use sendkeys and its not available in any js framework (not in selenium also). That's the reason I am mixing jquery with vbscript. It's simple but not working</p>
  
  <pre><code>&lt;script language="VBScript"&gt;
      Function startDataLoad()
          MsgBox ("Starting Data Load")
          DataLoad
      End Function
  
      Sub DataLoad()
          Dim objShell, WshShell
          Set objShell = CreateObject("WScript.Shell")
          objShell.AppActivate ("Oracle Applications - DEV ")
          Dim dteWait
  
          Dim dataArray
          dataArray = find_all_selected()
  
          For Each x In dataArray
          objShell.SendKeys (x)
          If (x = "^s") Then
          dteWait_l = DateAdd("s", 0.03, Now())
          Do Until (Now() &gt; dteWait_l)
          Loop
          End If
          Next
  
          objShell.SendKeys ("^s")
  
      End Sub
  &lt;/script&gt;
  
  &lt;script language="javascript"&gt;
      function find_all_selected() {
          var data_loader_a = [];
          $('body').find('input:checked').each(function () {
              current_data = $(this).closest('.parent ').find('li.data_loader_val').data('data_loader').split('|');
              data_loader_a.push(current_data);
          });
          return data_loader_a;
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Any help is appreciated</p>