I am trying to get the value of an input which is in an iframe.
When I submit the form I'm getting the alert telling me it's been submitted but when I try to get the value of the input it's alerting Object instead of the value.
Here is the code:
$(document).ready(function() {
$('#myiframe').load(function() {
$(this).contents().find('#myiframe').submit(function() {
$res = $("#myiframe").contents().find('input[name="subject"]');
alert('Form HAS been submitted'); //This works
alert($res); // returns Object Object
return true;
});
});
});
What I'm I doing wrong here?
alert($($res).val())?