Solved

IExplorer Problem, posting

Posted on 2003-11-08
2
257 Views
Last Modified: 2013-12-26
Hi

I have the following code:
Private Sub IE_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
    If InStr(LCase(IE.Document.activeElement.innerHTML), "<input") Then
        modMain.LoadingForm = True
        Dim x As String
        x = vbCrLf & "=== save_form," & IE.Document.activeElement.Form.Action
           
        Loginfo.addCurrentCheck x
        Dim count As Integer
        For count = 1 To IE.Document.activeElement.Form.elements.length
            Loginfo.addSetInput Y & "_form", IE.Document.activeElement.Form.Item(count).Name, IE.Document.activeElement.Form.Item(count).Value
        Next count
    End If
End Sub

If the active element is an input, then a form is being posted. In which case, i want to get the url being posted to and send it to as an arguement  addcurrentcheck.

Its not working but i dont know why.


Thanks,

Todd.
0
Comment
Question by:toddismyname
2 Comments
 
LVL 2

Accepted Solution

by:
gimmeadrink earned 500 total points
ID: 9708822
I can see two problems

a)     If InStr(LCase(IE.Document.activeElement.innerHTML), "<input") Then

you wouldnt find "<input xxxx />" in side an element that can be active... that is, i assume that an active element that can cause a navigate are form elements, in which case <input> can not be inside the HTML for that element. I suggest changing it to .outerHTML

b)        For count = 1 To IE.Document.activeElement.Form.elements.length

Id suggest "For count = 0 To ....."

HTH
0
 

Author Comment

by:toddismyname
ID: 9708893
Thanks a lot for that.... ur a champ... u have no idea how long i wasted on this problem ;p
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now