Jump to content
Sign in to follow this  

Selecting Value from JavaScript Onchange Dropdown

Recommended Posts

Hey everyone, I'm new to the AutoIt forums and AutoIt as well! 

Currently I am using AutoIt to perform a task for me in McAfee Email gateway. My current issue is that I need to have the script make a selection from a combobox that is in Javascript. The AutoIt Info tool does not identify the dropdown as a control so it is useless in this situation. (this defeats the use of the ControlCommand function)

I have tried the Send function and used keystrokes as well to no avail.

Basically, I need a function that will select the value "Event Log" from the menu. The HTML is provided below:

<select id="report" name="report" onchange="javascript:submit();">
    <option value="traffic_overview" selected="">Traffic Overview</option>
    <option value="traffic_tls">Traffic: TLS</option>
    <option value="threats_overview">Threats: Overview</option>
    <option value="threats_viruses">Threats: Viruses</option>
    <option value="threats_spam">Threats: Spam</option>
    <option value="threats_content">Threats: Content</option>
    <option value="threats_attachments">Threats: Attachments</option>
    <option value="tls_detail">Enforced TLS: Details</option>
    <option value="enforced_spf">Enforced SPF</option>
    <option value="enforced_dkim">Enforced DKIM</option>
    <option value="clickprotect_overview">ClickProtect: Overview</option>
    <option value="clickprotect_log">ClickProtect: Click Log</option>
    <option value="quar_release_overview">Quarantine: Release Overview</option>
    <option value="quar_release_log">Quarantine: Release Log</option>
    <option value="user_activity">User Activity</option>
    <option value="event_log">Event Log</option>
    <option value="audit_trail">Audit Trail</option>
    <option value="mta_availability">Inbound Server Connections</option>
    <option value="failsafe_overview">Disaster Recovery: Overview</option>
    <option value="failsafe_log">Disaster Recovery: Event Log</option>
Any advice is HIGHLY appreciated!!
I look forward to being a part of the AutoIt community.

Share this post

Link to post
Share on other sites

I am using IE, and I've already looked at the IE functions and tried a few but still no luck. Im looking for help narrowing down to a certain function.

So far I've tried IEGetObjectByID and the IEFormElementSetValue so far. Has anyone ever had to do this in the past?

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...