Sign in to follow this  
Followers 0
Lord Maim

Can't get object for HTML Button

3 posts in this topic

#1 ·  Posted (edited)

I'm trying to use _IEAction to press a button, but I can't seem to get an object for the button. Here's the relevant portion of the HTML code. The button that I'm trying to press is the "Save Report" button.

<form name='frmPageRange' method='POST'>

<DIV STYLE="margin-left: 10;">
<TABLE  WIDTH=98% BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
    <TD><BR>
    &nbsp;
    </TD>
</TR>
<TR  >
    <TD COLSPAN=2 CLASS="titlebar">
        &nbsp;&nbsp;Page Range:
    </TD>
    <TD width=12 ROWSPAN=2>
        &nbsp;
    </TD>
</TR>
<TR>
    <TD width=5%>
        &nbsp;
    </TD>
    <TD class="label">
        <p dir="ltr">
        <BR>
        <INPUT name="pageRange" type="radio" value='a' >&nbsp;All &nbsp;
        
        <I>(53 pages)</I>
        <BR>
        <INPUT name="pageRange" type="radio" value='c' CHECKED>&nbsp;Current page<BR>
        <INPUT name="pageRange" type="radio" value='r' >&nbsp;Pages:&nbsp;
        <INPUT name="CustomRange" value="" onblur="changeRange(1)" onkeydown="document.forms[1].elements[2].checked=true" size="20"> &nbsp;
        
        <I>(Please limit range to 50 pages or less for Excel Format)</I>
        <BR><BR>
        Enter page numbers and continuous page ranges separated by commas.  For example: 1,3,5-12.
        <!-- Esmrt Mod: Add overpagetotal = ESMRT_OVER_PAGE_TOTAL --!>
        <INPUT name="overpagetotal" type="hidden" value='is greater than the total number of pages'>
        <BR>
    </TD>
</TR>
</TABLE>
</DIV>

<TABLE WIDTH=96.5% BORDER="0" CELLSPACING="0" CELLPADDING="0" STYLE="margin-left: 10;">
<BR>
<TR CLASS="filterGray" >
    <TD><Center>
        <DIV STYLE="margin-left: 10;">
            <INPUT type=button value="View Report" class="button" onclick="applyLinkClick(0, 1)">
        </DIV>
    </Center></TD>
    <TD><Center>
        <DIV STYLE="margin-left: 10;">
            <INPUT type=button value="Save Report" class="button"  onclick="applyLinkClick(1, 1)">
        </DIV>
    </Center></TD>
</TR>

</TABLE>
<br>

</form>
Edited by Lord Maim

Share this post


Link to post
Share on other sites



What code have you tried? Since that element has no name attribute you'll need to use _IEFormElementGetCollection with an appropriate index.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

What code have you tried? Since that element has no name attribute you'll need to use _IEFormElementGetCollection with an appropriate index.

Dale

Thanks Dale, I didn't think of a collection. That's probably pretty rudimentary to you. :">

While I have you, I don't suppose you'd have an opinion on this...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0