私は、スクリプトの作業Javascript&JQueryの奇妙な問題または何が間違っていましたか?
...もう一つの方法を働いていないが、窓に窓から値を対処するため、この機能を持っています、今この他のスクリプトに
$(document).ready(function(e) {
$('#clickit').live({
click: function() {
window.opener.document.forms['orderForm']['service'].value = document.forms['GroundRates']['service'].value;
window.opener.document.forms['orderForm']['rate'].value = document.forms['GroundRates']['rate'].value;
self.close();
return false;
}
});
});
を私が何をしました違う?私はここで私の髪を引っ張っています。 .. ..私も試した
$(document).ready(function(e) {
$('#clickit').live({
click: function() {
var thisservice = document.forms['GroundRates']['service'].value;
var thisrate = document.forms['GroundRates']['rate'].value;
var thatservice = window.opener.document.forms['orderForm']['service'].value;
var thatrate = window.opener.document.forms['orderForm']['rate'].value;
$(thatrate) = $(thisrate);
$(thatservice) = $(thisservice);
self.close();
return false;
}
});
});
thatrate = thisrate;
thatservice = thisservice;
を
$(thatrate).val() = $(thisrate).val();
$(thatservice).val() = $(thisservice).val();
とをしかし、これは動作します:
に動作していない
var service = document.forms['GroundRates']['service'].value;
var rate = document.forms['GroundRates']['rate'].value;
window.opener.document.forms['orderForm']['service'].value = service;
window.opener.document.forms['orderForm']['rate'].value = rate;
window.opener
に正しくvarを割り当てていませんか?
FYI、構文は$(thatrate).val($(thisrate).val()) ' – climbage