[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.6

VBA WebBrowser submit to a Javascript form?

Asked by rmrq in VB Controls, Dynamic HTML (DHTML)

Tags: webbrowser, submit, vba

I am attempting to build a VBA 6.0 userform (just below) to submit the criteria on a javascript form/webpage (way below).  Is this possible?  Any suggestions?

Here's my code:
******************************************************
Private Sub cmdQuery_Click()

'WB.Navigate "http://acmeap01:7001/eds/power_query.jsp?type=Forward"

    Do Until WB.ReadyState = READYSTATE_COMPLETE
        DoEvents
    Loop
   
    WB.Document.Forms(0).prc_id.Value = ListBox1.Value
    WB.Document.Forms(0).effdate_f.Value = DTPicker1.Value
    WB.Document.Forms(0).effdate_t.Value = DTPicker2.Value
    WB.Document.Forms(0).startperiod.Value = DTPicker3.Value
    WB.Document.Forms(0).toperiod.Value = DTPicker4.Value
    WB.Document.Forms(0).submit

    Dim myPath As String

    '***Where to store the temporary file
    myPath = "C:\Documents and Settings\RMRq\Desktop\myTable.xls"

    'Save only the table from the WB using the DOM
    Open myPath For Output As #1
    Print #1, WB.Document.getElementsByTagName("Table").Item(4).outerHTML
    Close #1

    'Open it in Excel
    Dim oExcelApp As New Excel.Application
    Set oExcelApp = CreateObject("excel.application")
    oExcelApp.Visible = True
    oExcelApp.Workbooks.Open (myPath)

End Sub

Here's the javascript webpage:
******************************************************
<html>

<head>
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
<title>eds Reports</title>
<link rel="Stylesheet" href="eds.css" type="text/css">

<SCRIPT LANGUAGE="JavaScript" src='/eds/report_js.js'>

function Start(page) {
OpenWin = this.open(page, "CtrlWindow", "toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes");
}

</SCRIPT>

</head>

<SCRIPT LANGUAGE="JavaScript">

function Start(page) {
OpenWin = this.open(page, "CtrlWindow", "toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes");
}

function openWin(url, name) {
  var height = 300;
  var width  = screen.availWidth - 150;
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }

  str += ",resizable,scrollbars,menubar";

  window.open(url, name, str);
  windowIsOpen = "true";
}

</SCRIPT>
            
<BR>
<BR>
<CENTER><B><FONT size="5" color="#99CCFF">Forward Power/Other Selection Criteria </font></b></CENTER>
<form method="get/POST" action="power_query_result.jsp" name="power">
<table bgcolor="#99CCFF" width="700" align="center" cellpadding=5 cellspacing=0 border=0>
   <tr>
     <td>
       <TABLE width="700" bgcolor="#99CCFF" cellpadding=5 cellspacing=1 border=0>
       <font size="1">
            <TR bgcolor="#FFFFFF">
             <td><b>Index :</b></td>
             <td colspan="4"><select name="prc_id" size="10" multiple>
             <option value=1038>1038-COB Flat</option>
<option value=1014>1014-COB OffPeak</option>
<option value=1013>1013-COB OnPeak</option>
<option value=1040>1040-Four Corners Flat</option>
<option value=1041>1041-Four Corners OffPeak</option>
<option value=1039>1039-Four Corners OnPeak</option>
<option value=1042>1042-Mead Flat</option>
<option value=1001>1001-Mead OffPeak</option>
<option value=1000>1000-Mead OnPeak</option>
<option value=1087>1087-Mid-C Flat</option>
<option value=1044>1044-Mid-C OffPeak</option>
<option value=1043>1043-Mid-C OnPeak</option>
<option value=1045>1045-NP15 Flat</option>
<option value=1035>1035-NP15 Hourly Forward Price</option>
<option value=1012>1012-NP15 OffPeak</option>
<option value=1011>1011-NP15 OnPeak</option>
<option value=1007>1007-PV Flat</option>
<option value=1010>1010-PV OffPeak</option>
<option value=1009>1009-PV OnPeak</option>
<option value=1046>1046-SP15 Flat</option>
<option value=1003>1003-SP15 OffPeak</option>
<option value=1002>1002-SP15 OnPeak</option>
<option value=1047>1047-ZP26 Flat</option>
<option value=1028>1028-ZP26 OffPeak</option>
<option value=1027>1027-ZP26 OnPeak</option>
      
              </select></td>
          </tr>
      <tr bgcolor="#FFFFFF" >
      
      <td><b>Effective Date:</b></td>
      
      <td width="40"><b>From</b></td><td><input type="text" name="effdate_f" value="07/18/2004" size=8 maxlength="10" onFocus="javascript:vDateType='1'" onKeyUp="DateFormat(this,this.value,event,false,'1',0)" onBlur="DateFormat(this,this.value,event,true,'1',1)"></td>
      
      <td><b>To</b></td><td><input type="text" name="effdate_t" value="07/18/2004" size=8 maxlength="10" onFocus="javascript:vDateType='1'" onKeyUp="DateFormat(this,this.value,event,false,'1',0)" onBlur="DateFormat(this,this.value,event,true,'1',1)"></td>
      <tr bgcolor="#FFFFFF">
      <td><b>Period Date:</b></td>
      
      <td><b>From</b></td><td><input type="text" name="startperiod" value="" size=8 maxlength="10" onFocus="javascript:vDateType='1'" onKeyUp="DateFormat(this,this.value,event,false,'1',0)" onBlur="DateFormat(this,this.value,event,true,'1',1)"></td>
      
      <td><b>To</b></td><td><input type="text" name="toperiod" value="" size=8  maxlength="10" onFocus="javascript:vDateType='1'" onKeyUp="DateFormat(this,this.value,event,false,'1',0)" onBlur="DateFormat(this,this.value,event,true,'1',1)"></td>
      
      </tr>
      <tr bgcolor="#FFFFFF">
      <td><b>Price Type: </b></td>
      <td colspan="3"><input type="radio" name="prc_cde" value="Settled" disabled>Settled <BR><input type="radio" name="prc_cde" value="Forward" checked>Forward</td>

      <td><b>Exclude Weekend and Holidays?  </b>
      <input type='checkbox' name='weekendflag' 'value='Y' checked></td>

      </tr>
      
      <tr bgcolor="#FFFFFF"><td colspan="5"><input type="submit" value="Retrieve" onClick="javascript:return ValidateForm(window.document.power.effdate_f,window.document.power.effdate_t,window.document.power.startperiod,window.document.power.toperiod,1)"></td></tr>
      </table>
      </td>
      </tr>
</table>
</form>


</body>
</html>
[+][-]07/19/04 03:42 PM, ID: 11588128Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/19/04 06:26 PM, ID: 11588911Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/20/04 02:33 AM, ID: 11591123Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/20/04 08:43 AM, ID: 11594119Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/20/04 02:47 PM, ID: 11597832Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/20/04 02:57 PM, ID: 11597907Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/20/04 03:42 PM, ID: 11598184Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/20/04 03:45 PM, ID: 11598204Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/20/04 03:47 PM, ID: 11598223Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/20/04 04:40 PM, ID: 11598521Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/20/04 06:20 PM, ID: 11598961Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/21/04 09:41 AM, ID: 11604556Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/21/04 03:26 PM, ID: 11607751Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: VB Controls, Dynamic HTML (DHTML)
Tags: webbrowser, submit, vba
Sign Up Now!
Solution Provided By: zzzzzooc
Participating Experts: 1
Solution Grade: B
 
[+][-]11/02/04 03:35 PM, ID: 12478882Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81