2014-01-05 1 views
-1

에 iframe을 오픈 번째 결과를 colourbox하는POST 형태는 iframe이 자체 I 양식을 가지고

<form method="POST" action="qwerty.php" /> 

<input type="text" name="merchant" /> 
<input type="text" name="password" /> 

<input type="submit" value="go" /> 

</form> 

내가 문제는이 PHP로 값 게시하고 결과를 얻을 또는에서 열 reponse하면된다하려고 이건 가능하지? 어떤 도움이 필요합니까?

답변

0

편집 :

$merchant = $_POST['merchant']; 
$password= $_POST['password']; 

내가 :

다음
var merchant = $('form input:nth-child(1)').val(); 
var password= $('form input:nth-child(2)').val(); 

$('form input[type="submit"]').click(function() { 
    $.post("qwerty.php", { merchant: merchant, password: password }, function(data) { 
    // #extraDiv is a div with display:none that will serve as a wrapper for the data 
    $('#extraDiv').html(data).colorbox(); 

    }); 
}); 

qwerty.php에서 u는 전송 된 값을 데리러 : Ajax와 JQuery와이 사용

같이 달성 될 수있다 색상 상자에 익숙하지는 않지만 위의 방법이 효과가있을 수 있습니다.

+0

알림을 표시하려고하지 않습니다! ajax를 사용하여 iframe의 색상 상자에서 응답을 열고 싶습니다. – user3163619