Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TWebBrowserPopulatingWebPageAjax


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 0
Jan B

Posts: 11
Registered: 1/7/11
TWebBrowserPopulatingWebPageAjax  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 14, 2017 1:54 PM
We have a website that we have been populating the web forms, using Delphi 2010 and TWebbrowser. The client has made a change recently and modified the select list to use Ajax. The code below will set focus to the input box and it displays List All, but I can not get the mouse click or enter button to update the input with List All, so it changes to a select box. When I do it manually, I click on the input box and the List All is displayed. If I press enter or click on the List All the input box changes to a select box with List All displayed. I tried using jquery to have the enter key press on the input box after setting focus to it, but it doesn' t do anything. Any ideas?

elem := GetElementById(Web.Document, Customer) as IHTMLElement;
if Assigned(elem) then
begin
(elem as HtmlInputElement).focus;
.............

end;

<input type="text" name="n_Customer" class="Customer inst" id="Customer" value="Search" title="Search"/>


<input type="hidden" tabindex="-1" name="hdn_Customer" class="selected_Customer" id="hdn_Customer" value=""/>

<script type="text/javascript">
Event.observe(document, 'dom:loaded', function() {
new Customeraj("hdn_Customer", {orgType:'res', listType:'CUSTLIST', pageName:'SelCust', showSecondaryIndicator:'false', showAll:'false', showChoose:''});
});
</script>
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02