SetText() is not working in IE8 vesion

Oct 30, 2012 at 11:03 PM
Edited Oct 30, 2012 at 11:05 PM

Hi,

For some reason the SetText() is not working in IE 8 version. Where as it is working in IE 9 version. Throwing an error message control not found.   

public CUITe_HtmlEdit txtSearch = new CUITe_HtmlEdit("Id=datatable_filter");pgPartnerOrganizations.txtSearch.SetText(htPartnerData["partnernumber"].ToString())

I have observed following difference in HTML 

IE 9 :

 <div class="dataTables_filter" id="datatable_filter">
 Text - Search:
 <input type="text"/>

IE 8 :


<div class="dataTables_filter" id="datatable_filter">
 Text - Search:
 <input type="text"/>

Please let me know, If you need more information.

 Thanks,

 Sailaja

 

 

 

 

 

 

 

Hi,

Coordinator
Nov 1, 2012 at 5:51 AM
Edited Nov 1, 2012 at 5:51 AM

Hi Sailaja,

 

I think this line of code is incorrect:

 

public CUITe_HtmlEdit txtSearch = new CUITe_HtmlEdit("Id=datatable_filter");

 

If there really is no Id attribute set on the input control, then you'll need to navigate to the input control manually as follows:

 

CUITe_HtmlDiv div1 = bWin.Get("id=datatable_filter");
CUITe_HtmlEdit inputTextBox = div1.Get<CUITe_HtmlEdit>();
inputTextBox.SetText("test");