468,554 Members | 1,972 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,554 developers. It's quick & easy.

How do I use a mouse click to select a particular dropdown option?

Hi, Thanks in advance to for the help!!!!!

When the page loads, "Application Inventory" is selected by default ---
I want to use a mouse.click to select "Systems Compliance",
BUT HOW?
I'm clueless as I don't write javascript, but would really appreciate the assistance. Thanks a MILLION!

[HTML]<script language="javascript" type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("m icrosoft") > -1) {
theform = document.CriteriaBar;
}
else {
theform = document.forms["CriteriaBar"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>

<table cellSpacing="0" cellPadding="2" width="100%" border="0">
<tr>
<td noWrap align="center"><span class="ReportSelectLabel">Select Report</span>
</td>
</tr>
<tr>
<td>
<select name="_ddlReports" onchange="javascript:OnChange();__doPostBack('_ddl Reports','')" language="javascript" id="_ddlReports" class="ReportSelect" style="height:24px;width:100%;">
<option selected="selected" value="Application Inventory">Application Inventory</option>
<option value="Computer Inventory">Computer Inventory</option>
<option value="Failed System Scans">Failed System Scans</option>
<option value="Installed Patches By Product">Installed Patches By Product</option>
<option value="Installed Patches By Severity">Installed Patches By Severity</option>
<option value="Missing Patches">Missing Patches</option>
<option value="Missing Patches By System">Missing Patches By System</option>
<option value="Missing Patches By Severity">Missing Patches By Severity</option>
<option value="Missing Patches Detailed">Missing Patches Detailed</option>
<option value="Missing Patches Summary">Missing Patches Summary</option>
<option value="New Patches">New Patches</option>
<option value="Patch Analysis">Patch Analysis</option>
<option value="Patch Details">Patch Details</option>
<option value="Patch History">Patch History</option>
<option value="Patch Signature">Patch Signature</option>
<option value="Patch Status Summary">Patch Status Summary</option>
<option value="Policy Compliance">Policy Compliance</option>
<option value="Policy Coverage">Policy Coverage</option>
<option value="Policy Details">Policy Details</option>
<option value="Pushed Patches">Pushed Patches</option>
<option value="Severity Dynamics">Severity Dynamics</option>
<option value="Scan Dynamics">Scan Dynamics</option>
<option value="Systems Compliance">Systems Compliance</option>
<option value="Verify Installed Patches">Verify Installed Patches</option>

</select>[/HTML]
Aug 20 '07 #1
2 1824
vituko
48
<option selected="selected" value="Application Inventory">Application Inventory</option>

selected="selected"!!!! The option which has this attribute would be the selected by default.

Any way if you want to simulate an event :

createEventObject / createEvent and dispatchEvent / fireEvent
Aug 20 '07 #2
acoder
16,027 Expert Mod 8TB
Please use CODE tags when posting code. Thanks.

Also, use a good thread title. Thanks!
Aug 20 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Bernard Philip | last post: by
4 posts views Thread by Xerxes | last post: by
3 posts views Thread by cover | last post: by
1 post views Thread by Andy Baxter | last post: by
3 posts views Thread by Morten Snedker | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.