title: VBScript To Launch Internet Explorer With A URL Generated
body: <p>Currently I'm a learning HTA programming.  I have a requirement as follows.</p>
  
  <p>There are two input boxes in the form (both are mandatory).  When I enter the values and click on search button, a url would be created based on the inputs.  The should launch the Internet Explorer application with the generated url.  </p>
  
  <p>My issue is that I'm able to launch IE browser but I'm not able to pass the url to it.
  I have tried many ways but I'm not able to get it done.</p>
  
  <p>I have the given my code below.  I have removed my erroneous syntax of passing the url to the browser.  The below code would create the url and launch a blank IE explorer.  </p>
  
  <p>Please help me. Thanks in advance.</p>
  
  <pre><code>&lt;html&gt; 
  &lt;head&gt; 
  &lt;script language="VBScript"&gt; 
  
      Sub RunProgram
          callb = document.getElementById("callb").value
          call = document.getElementById("call").value
          url = "www.google.com"&amp;callb&amp;"and"&amp;call
          msgbox(url)
          Set objShell = CreateObject("Wscript.Shell")
          objShell.Run "iexplore.exe"
      End Sub
  
  &lt;/script&gt; 
  &lt;/head&gt; 
  &lt;body&gt;
  
  &lt;form style="width:254px; height:44px;"&gt;
  CallB: &lt;input type="text" id="callb" value=""&gt;&lt;br&gt;
  Call  : &lt;input type="text" id="call" value=""&gt;&lt;br&gt;&lt;br&gt;
  &lt;button onclick="RunProgram"&gt;search&lt;/button&gt;
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>