Solved

IExplorer Problem, posting

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

707 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

13 Experts available now in Live!

Get 1:1 Help Now