php - JavaScript not Initializing in Drupal Block -


i have following fiddle: http://jsfiddle.net/vyblx/125/

the purpose update thumbnail appropriate selection in dropdown menu. i'm attempting implement piece of code inside of drupal block dropped specific page.

the page implemented on is: http://sulzbachercenter.org/fundraisers/give-a-good-night in order implement code, i've rewritten js separate file , called this:

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="http://sulzbachercenter.org/sites/default/files/ggn_js/dyn.js"></script> 

the block can run php , html fully, know that's not issue - i'm out of troubleshooting ideas. can see why code won't work in drupal environment?

the jquery selector looking '#dynselect', combobox in form not have 'id'.

you can either add id="dynselect" combobox.

or
change

$('#dynselect').change(function () {     var val = $('#dynselect').val();     $('#dynimg').attr("src",picturelist[val]); }); 

to like:

$("select[name='os0']").change(function () {     var val = $("select[name='os0']").val();     $('#dynimg').attr("src",picturelist[val]); }); 

Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -