+ Reply to Thread
Results 1 to 2 of 2

The form name changes everytime we open the page

Hybrid View

  1. #1
    Registered User
    Join Date
    12-12-2005
    Posts
    13

    The form name changes everytime we open the page

    I need to import a table from the stats page within our Yahoo Store, normally this would be easy, however yahoo is doing

    the following to the page:

    1. Page URL changes everytime you log into the website
    1.1 - Solved by navigating to the page with script1(see footnotes)
    2. Once on the correct page, the form name changes everytime the page is loaded
    2.1 - There is however, only one form on the page.
    3. The names of the form options change everytime the form is submitted.

    What am I trying to do?
    1 - Submit the form so that it only displays the last 10 days (rather that the default 365 days) using VBA
    2 - Importing the form that loads into Excel

    I tried using InStr to find the form name, this is what I have so far:
    sPage = IE.document.body.InnerHTML
    iFormName = InStr(1, sPage, "name=")
    iFormNameEnd = InStr(iFormName, sPage, ">")
    About the form:
    1. The form name always has a fF before the number
    2. There are always three imput values, starting with the Submit(Value=show)
    3. The two radio button names are incemented from the submit
    (eg. Submit(Name=F410), then the next two names would be F411 and F412)
    4. This is the only form on the page.

    Thank you.
    Simon.



    Footnotes:
    Script1 which loads the page with the form below:
    Sub importStats()
    'Microsoft HTML Objects Library
    'Microsoft Internet Controls
    Dim IE As New InternetExplorer
    Dim Cible As HTMLAnchorElement
    Dim Doc As HTMLDocument
    Dim sPage As String
    Dim iFormName As Long, iFormNameEnd As Long
    Dim iStart As Long, iEnd As Long
    Dim iForm As Long
    
    
    IE.Visible = True
    IE.Navigate "http://<STORE URL WITH LOGIN DATA>/"
    
    Do Until IE.readyState = READYSTATE_COMPLETE
        DoEvents
    Loop
    
    Set Doc = IE.document
    Set Cible = Doc.Links(19)
    Cible.Click

    HTML Code: 

  2. #2
    Registered User
    Join Date
    12-12-2005
    Posts
    13

    suggestion?

    could we use VBA to select the 1st radio option in set one and the 3rd in set 2?

    thank you.
    Simon

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1