Solved

IExplorer Problem, posting

Posted on 2003-11-08
2
258 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

770 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