tags:

views:

71

answers:

2

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

A: 

To change an iframe's url, you update its src attribute.

Jeff Ober
+2  A: 

I think this will work:

$('#dropdownid').bind('change', function() {
    $('#iframeid').attr('src', $(this).val());
});
Mark B