I receive a web page which has javascript in it.
I want to copy the select option values, i.e. Asia, Europe, etc from the select statement in javascript. I am using IE as browser, Delphi 7 and TWebBrowser.
ovElements.item(i).name points at the select belonging to region52708
I try this:
for j := 0 to ovElements.item(i).options.length-1 do begin
Memo1.lines.add('option ' + inttostr(j) + ' ' + ovElements.item(i).options[j].value;
end;
The syntax is not correct.
Is someone able to point me at the correct way to make the options from the script visible in Delphi?
Thanks in advance.
Regards,
Franz
Code:
<select name="region52708" class="popup" onchange="javascript:selectRegion(52708)">
<option value=""></option>
<option selected value="N America">N America</option>
<option value="Asia">Asia</option>
<option value="Europe">Europe</option>
<option value="Global">Global</option>
<option value="S America">S America</option>
<option value="Africa">Africa</option>
</select>
ovElements.item(i).name points at the select belonging to region52708
I try this:
for j := 0 to ovElements.item(i).options.length-1 do begin
Memo1.lines.add('option ' + inttostr(j) + ' ' + ovElements.item(i).options[j].value;
end;
The syntax is not correct.
Is someone able to point me at the correct way to make the options from the script visible in Delphi?
Thanks in advance.
Regards,
Franz