Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute JavaScript in an HTML Page

Status
Not open for further replies.

hilbertl3

Technical User
Sep 22, 2004
77
US
All,

I am accessing a website through a vb application.
this website has a dropdown menu that is populated dynamically. I am trying to select an option from the dropdown menu and then submit the form, mimicking the actions that a user would ordinarily perform manually.
I'd like to execute the javascript that fires when the listbox is changed, passing my selected option as a paramter. However, I am having a devil of a time with the syntax for the paramter. I am very new to HTML. Any help you can provide would be greatly appreciated.

hilbertl

Here is an excerpt from the website's code:

<SCRIPT LANGUAGE="JavaScript">
document.close();
document.open();
document.writeln("<HTML>");
if (document.all) {
document.writeln("<BODY class='DropDownBG' MARGINHEIGHT='0' MARGINWIDTH='0'>");
}
else {
document.writeln("<BODY class='DropDownBGNS' MARGINHEIGHT='0' MARGINWIDTH='0'>");
}
document.writeln("<table cellpadding=0 cellspacing=0><tr><FORM NAME='SelectForm'><td>");
document.writeln('<img src="interface/Default/resource/clearpix.gif"><SELECT NAME="SelectMenu" onChange="getServices(this.form)">');
tot = numgrp - 1;
document.write("<OPTION>Select a group");
for (var i = 1; i <= tot; i++) {
document.write("<OPTION");

document.write(">" + getLocalizedGroupName(group));
}
document.write('</SELECT>');

document.write('</td></FORM></tr></table>');
document.close();
</SCRIPT>
</BODY>
</HTML>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top