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

[Solved] radcombobox.selectedvalue for open windows

3 Answers 139 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
casa51
Top achievements
Rank 2
casa51 asked on 26 Oct 2009, 11:08 AM
hi,

 

I have a radcombobox and a button
i want to when clik the button a news windows open with doc pdf
I write this code :

 

Protected Sub ImageButton1_Click(ByVal sender As ObjectByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click  
 
Dim varpdf As String = "../up_fic/" & RadComboBox1.SelectedValue  
 
If varpdf <> "" Then 
 
Response.Write("<script>window.open('" + varpdf + "');</script>")  
 
End If 
 
End Sub 
 
this work but not fine the pop up blocker block alltime this action
how i do to open normaly a news windows ?

Thanks.

3 Answers, 1 is accepted

Sort by
0
casa51
Top achievements
Rank 2
answered on 28 Oct 2009, 04:09 PM
hi,
can i have a simple exemple for keep a radcombobox.value in client side
for exemple i have one radcombobox and when i select a value the specific link change to the selected value off the radcombobox in client side.
i found a way in server side but i didin t like the postback this is my code :
page.aspx

<

 

telerik:RadComboBox ID="RadComboBox1" Runat="server" AutoPostBack="true"

 

 

Width="372px" MaxHeight="60px">

 

 

</telerik:RadComboBox>

 

<

 

a href= '<%= "up_fic/demarches/" & RadComboBox1.SelectedValue %>' target="_Blank" >


perhaps need to use ajax ?
i shearch a simple exemple but nothing
thanks for all
0
Accepted
Yana
Telerik team
answered on 29 Oct 2009, 09:20 AM
Hello there,

Please try it like this:

<telerik:RadComboBox ID="RadComboBox1" Runat="server" Width="372px"
    MaxHeight="60px" OnClientSelectedIndexChanged="selectedIndexChanged">
</telerik:RadComboBox>
<a id="changedLink" href= "up_fic/demarches/"  basehref="up_fic/demarches/"
target="_Blank" >test</a>

and selectedIndexChanged client-side event:

<script type="text/javascript">
    function selectedIndexChanged(sender, args) {
        var link = document.getElementById("changedLink");
        link.href = link.attributes["basehref"].value + args.get_item().get_value();
    }
</script>


Regards,
Yana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
casa51
Top achievements
Rank 2
answered on 29 Oct 2009, 01:41 PM
Yesss that work great  !!!!!!
thanks a lot
Tags
ComboBox
Asked by
casa51
Top achievements
Rank 2
Answers by
casa51
Top achievements
Rank 2
Yana
Telerik team
Share this question
or