I have the following html:
<html>
<head></head>
<body>
<form>
<input id="msg" type="text" value="oldValue" />
</form>
<script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
<script>
$().ready(function() {
var m = $("#msg");
alert(m.val()); // returns oldValue
m.val("newValue"); // this doesn't make the browser show newValue instead of oldValue
alert(m.val()); // returns newValue
// and in the end, the browser still shows oldValue for the input
});
</script>
</body>
</html>
This code runs perfect, but when placed in a facebox (which just creates an iframe and shows it like a floating window), the code fails to update the input's content.
The parent also has jQuery, but that shouldn't influence anything I guess.
Any ideas why it's failing?