Why isn't this script working?
$(function() {
var isbn = $('input').val();
$('button').click(function() {
$("#data").html('<iframe height="500" width="1000" src="http://books.google.com/books?vid=ISBN' + isbn + '" />');
});
});
As you can see, I'm trying to do an extremely simple ISBN lookup field for a demo web site. The script is supposed to take the value of the input and insert it into the URL. Why isn't it working?
Also, is there a better way to accomplish this end?
I realize, of course, that iframes are rubbish, but I just want to keep it simple right now.