<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script>
function open(url) {
$('#blockdiv').fadeIn();
$('#iframe').attr('src', url);
$('#containerdiv').fadeIn();
}
function close() {
$('#blockdiv').fadeOut();
$('#containerdiv').fadeOut();
}
$(document).ready(function() {
$('ul').css({width: $('#containerdiv').width(),height:$('#containerdiv').height()})
$('#close').click( function() { close() })
$('#nj_apply').click( function() { open('http://www.yahoo.com/') })
});
</script>
<td>
<input id= "nj_apply" type=button value="Apply" >
</td>
In the above code, url (http://www.yahoo.com/) is hardcoded in the script tag. But I want to pass the url to the above jquery function from the input tag itself. Whenever I click on apply button it should pass the url to the above jQuery function.
Is it possible to do it?