Reputation: 4660
I want to create a page that has a dropdown and an iframe, so that the iframe location will change based on the url in the dropdown. What is the correct syntax to get jquery to update the iframe's url?
thanks
Upvotes: 0
Views: 6254
Reputation: 29785
I think this will work:
$('#dropdownid').bind('change', function() {
$('#iframeid').attr('src', $(this).val());
});
Upvotes: 3