폼전송할때 변수넘기는방법

폼전송할때 변수넘기는방법

QA

폼전송할때 변수넘기는방법

본문

입력된번호를 다른페이지로 값을넘겨주는데 잘안됨니다.ㅜ.ㅜ

빨간부분에 <?=$member[mb_hp]?> 이렇게넣어봐도안되구해서 문의좀드립니다

 

<input class=m_text type=text name='mb_hp' size=21 maxlength=20 <?=$config[cf_req_hp]?'required':'';?> itemname='핸드폰번호' value='<?=$member[mb_hp]?>'> 

 

 <input type=button value='인증번호 전송' class='small' onclick="openWin("<?=$member_skin_url?>/hp_certify.php?hp="+f.mb_hp.value+"&token=<?=$token?>", 200, 200)"/>  

 

  <script> 

function openWin(url, w, h)

{

var left = (screen.width/2)-(w/2);

var top = (screen.height/2)-(h/2);

w=window.open(url, '_blank', width='+w+', height='+h+', scrollbars='no', menubar='no', resizable='no', location='no', toolbar='no', top='+top+', left='+left+', 'false');

w.focus();

}

  </script>  

 

Copied to clipboard!
Copied to clipboard!
Copied to clipboard!

이 질문에 댓글 쓰기 :

답변 3


<input class=m_text type=text name='mb_hp' id='mb_hp' size=21 maxlength=20  itemname='핸드폰번호' value='*** 개인정보보호를 위한 휴대폰번호 노출방지 ***'> 
 
<input type="button" value="send" class="small" 
onclick=openWin("http://major.com/hp_certify.php?token=<?=$token?>&hp="+document.getElementById('mb_hp').value+"",200,200)> 

 <script> 
function openWin(url, w, h)
{
//location.href=url;
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
w=window.open(url, '_blank', width='+w+', height='+h+', scrollbars='no', menubar='no', resizable='no', location='no', toolbar='no', top='+top+', left='+left+', 'false');
w.focus();
}
  </script>
   

<input class=m_text type=text name='mb_hp' size=21 maxlength=20 <?=$config[cf_req_hp]?'required':'';?> itemname='핸드폰번호' value='<?=$member[mb_hp]?>'> 

에서 id값을 주세여 id='mb_hp'

그리구 빨간색 수정부분을 document.getElemenyById('mb_hp').value

로 고쳐보세여

그리고 그전에 mb_hp 인풋박스에 전화번호가 표시되어서 값이 있어야댑니다

 

최종적으로 아래처럼 변경햇는데 작동을안하네여 봐주시면감사하겟습니다
 
<input class=m_text type=text name='mb_hp' id='mb_hp' size=21 maxlength=20 <?=$config[cf_req_hp]?'required':'';?> itemname='핸드폰번호' value='<?=$member[mb_hp]?>'>
 
      <input type=button value='인증번호 전송' class='small' onclick="openWin("<?=$member_skin_url?>/hp_certify.php?hp="+document.getElemenyById('mb_hp').value+"&token=<?=$token?>", 200, 200)"/>

오타가 있네요 document.getElementById('mb_hp').value 입니다 

다시 말하지만 인풋박스안에 값이 있어야 팝업에도 값이 같이 넘어갑니다

네 번호입력후에 전송버튼누르고 크롬개발자로 확인해보면 이런식으로 못읽고있어서요토큰은제데로입력되는데

<input type="button" value="인증번호 전송" class="small" onclick="openWin(" http:="" major.com="" skin="" member="" basic="" hp_certify.php?hp="+document.getElementById('mb_hp').value+" &token="28387478d131af4dce977356eb933234," 200,="" 200)="">

답변을 작성하시기 전에 로그인 해주세요.
전체 310
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT