| 제목 | jquery 질문 드려요. ㅠ.ㅠ | ||
|---|---|---|---|
| 글쓴이 | 박순철 | 작성시각 | 2010/08/16 11:33:15 |
|
|
|||
$(function() {
var resultNum = '';
$('.orderListOrder') // 반복되는 td
.each(function(i) {
})
.click(function()
{
//alert($(this).prev().text());
resultNum = ($(this).prev().text());
var winObject = null;
var settings = 'width=500,height=700,toolbar=no,location=no,status=no,menubar=no,scrolbars=yes,resizable=yes,left=300,top=100';
winObject = window.open("orderListPopup", "orderinfo", settings);
// winObject.document.write(resultNum); // 정상출력
// winObject.alert(resultNum); // 정상출력
$.ajax({
type: "POST",
url: winObject,
data: {orderListseq:resultNum},
success: function()
{
}
});
});
});
부모창에 있는 resultNum 값을 자식창을로 넘기고, 그 값을 ajax를 이용해서 php로 넘길려고 하는데요. ajax를 이용한것이 값이 넘어 가지 않아서... 요.. 컨트롤러
function orderListPopup()
{
$orderListSequence = $this->input->post('orderListseq');
//$orderList_id = $this->uri->segment(3, 0);
// echo $orderListSequence;
$data['result'] = $this->openmarket_model->modifyData($orderListSequence);
$this->load->view('head');
$this->load->view('orderListPopup');
$this->load->view('tail');
}
선배님들의 조언 부탁드려요... |
|||
| 다음글 | 간단한 페이지 작업인데 CodeIgniter로 작업해도... (4) | ||
| 이전글 | 도와주세요 (3) | ||
|
변종원(웅파)
/
2010/08/16 12:59:45 /
추천
0
|
|
박순철
/
2010/08/16 13:44:59 /
추천
0
resultNum = $(this).prev().text();
$.ajax({
url: 'orderListPopup',
data: {"orderListseq":20},
type: "POST",
dataType: "text",
cache: false,
error: function()
{
alert("Ajax failure");
},
success: function()
{
alert(resultNum);
}
}); 이렇게 해도 값이 넘어 오지 않고 있는데. 다시 한번 봐야겠네요. 답변주셔서 고맙습니다. |
|
mycastor
/
2010/08/16 15:32:44 /
추천
0
음.. ajax 메소드 내의 옵션 항목을 아래와 같이 변경해보세요. |
|
변종원(웅파)
/
2010/08/16 17:07:48 /
추천
0
url:
'orderListPopup', 호출 주소가 틀리셨다고 위에 올렸는데 이건 수정을 안하셨네요.
|
resultNum = ($(
this).prev().text()); 이 부분도 걸리구요. 필요없는 대괄호가 있습니다.
data: {orderListseq:resultNum}, 이 부분이 결정적으로 ...
data: {"orderListseq":resultNum},
jquery 홈페이지의 래퍼런스나 책 참고하시기 바랍니다.