471,328 Members | 1,954 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,328 software developers and data experts.

ajax extension for cascading dropdown

I have problems updating the image on the page.

<script language="javascript" type="text/javascript">
function pageLoad(sender, args)
{

$find("cddCountry").add_selectionChanged(onCCSChan ged);

}

function onCCSChanged()
{

//change the images based on the selected value.

imgFlag.ImageUrl = "~/images/flags/" + ddlCountry.SelectedValue + ".gif";
}

</script>
<div align="center">

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode ="Conditional">
<ContentTemplate>

Country:

<img src="<%= Page.ResolveUrl("~/images/flags/" + ddlCountry.SelectedValue + ".gif") %>" name="imgFlag" id="imgFlag" alt=""/>

<br />

<asp:DropDownList style="position: static" Font-Size="Smaller" Font-Bold="true" Width="190px" ID="ddlCountry" runat="server"></asp:DropDownList>

<ajaxToolkit:CascadingDropDown ID="cddCountry" runat="server"

TargetControlID="ddlCountry"

Category="Country"

PromptText="Choose a Country"

LoadingText="Loading Countries..."

ServicePath="../LocationService.asmx"

ServiceMethod="GetCountries" />
Jun 27 '08 #1
0 971

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Colin Walls | last post: by
8 posts views Thread by sheldonlg | last post: by
22 posts views Thread by sheldonlg | last post: by
3 posts views Thread by Cirene | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.