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

Display search result on item click.

1 Answer 38 Views
TagCloud
This is a migrated thread and some comments may be shown as answers.
JC
Top achievements
Rank 1
JC asked on 15 Mar 2013, 11:34 AM
Hi All,

I hav a radtagcloud that contain certain items. On clicking the item I want to open a radwindow that contain the google search result page with the clicked item as the search keyword. Please help.

Thanks,
JC.

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 15 Mar 2013, 12:17 PM
Hi JC,

You can use the OnClientItemClicked client side event to achieve your scenario. I tried to display the search results using google there are some issues when I tried to open google within the RadWindow.(Also in case of iframe). Please have a look into the following code I tried in which I am displaying the search results using Bing.

ASPX:
<telerik:RadWindowManager runat="server" ID="RadWindowManager1" ShowContentDuringLoad="false">
        <Windows>
            <telerik:RadWindow runat="server" ID="RadWindowSearch" Left="350px" OffsetElementID="tagCloudWrapper"
                Width="500px" VisibleStatusbar="false">
            </telerik:RadWindow>
        </Windows>
</telerik:RadWindowManager>


JavaScript:
function OnClientItemClicked(sender, args) {
  var searchString = args.get_item().get_text();
  radopen("http://www.bing.com/search?q=" + searchString, "RadWindowSearch");
}

Thanks,
Shinu.

Tags
TagCloud
Asked by
JC
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or