No, I'm not sure, but it seems like the correct object to me.

By way of background, this is a form that appears on the Securities and Exchange Commission's web site that investors can use to get information about investment advisors. The URL is http://www.adviserinfo.sec.gov/IAPD/Content/Search/iapd_OrgSearch.aspx.

When I open this page up in a regular browser I fill in the field next to the label "CrdNumber" with a known value for an existing investment advisor (the value I use is 144549). To submit the form, I click on what looks like a "button" that is next to the field that I filled in. This process gets me to the page (information) that I really want. This is the process that I would like to automate over a large number of investment advisors

Although I have never worked with JS, I have worked a little with Java, so it seemed odd to me that there was no "onClick()" method in the underlying source code. There was an earlier thread that I read that had a similar issue and the advice was that the object is not, in fact, a button. That thread suggested using ie->follow_link() which is why I tried adding it to my code.

One other thing, although there are four (4) forms on the page, once I have filled in the CrdNumber field, if I click on ANY of the "submit" buttons (they all have different names) my submission works fine. The reasons for this are probably obvious to someone with more coding experience than myself, but it is a mystery to me.

I'm going to try to follow those (relative) URLs from the JS lines. I will get back on that. Thanks for you advice.


In reply to Re^4: WIN32::IE::Mechanize - can't follow link - JavaScript involved by Ninth Prince
in thread WIN32::IE::Mechanize - can't follow link - JavaScript involved by Ninth Prince

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.