This is a migrated thread and some comments may be shown as answers.

accessing combobox from a different frame

2 Answers 27 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
alan
Top achievements
Rank 1
alan asked on 17 Jan 2011, 06:15 PM
Hello
I'm trying to automate a combobox selection from a different frame then the one that contains the control.
For standard HTML controls just write parent.rightFrame.document.getElementbyId.....
However whem I try parent.rightFrame.document.$find("<%=  radcombobox.ClientID %>") I get an error saying that object doesn't suppot this method.
I'm not at all familiar with the radcontrols and i;m not sure I'm doing this right. I got the control ID from the following html element:
<div class="RadComboBox RadComboBox_WebBlue" id="ctl00_CPH1_GridView1_gvReceivingTransactions_ctl03_gvSkidWeights_ctl02_ddlLocation" >  and i tried:

var tbLocation = parent.rightFrame.document.$find("<%= ctl00_CPH1_GridView1_gvReceivingTransactions_ctl03_gvSkidWeights_ctl02_ddlLocation.ClientID %>");

Is my syntax incorrect or is the problem that I'm accesing the control from a different frame. If that's the problem what can I do to work around it?

Thanx. I Hope someone can help me.

2 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 18 Jan 2011, 02:08 PM
Hello Alan,

Try this:

var tbLocation = $find("ctl00_CPH1_GridView1_gvReceivingTransactions_ctl03_gvSkidWeights_ctl02_ddlLocation", parent.rightFrame.document);

You don't use the ASP.NET script tags if the control is not part of the current page. Also, I'm using the optional parameter of the $find method where I pass the parent control to search for the RadComboBox in.

I hope that helps.
0
alan
Top achievements
Rank 1
answered on 19 Jan 2011, 11:14 PM
Hi Cori,

Thanx for your reply. I tried your suggestion and when I try var location = $find.... I get an error saying "Object expected".
Any suggestions?

Thanx for your help

Alan
Tags
ComboBox
Asked by
alan
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
alan
Top achievements
Rank 1
Share this question
or