?
Solved

IExplorer Problem, posting

Posted on 2003-11-08
2
Medium Priority
?
267 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
gimmeadrink earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…
Suggested Courses

719 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