2010-02-22 4 views
0

입력 텍스트 필드에 값을 넣고 IE에 양식을 제출할 때 다음 단계로 넘어가는 데 작은 문제가 있습니다.텍스트 필드에 값을 동적으로로드하는 방법은 무엇입니까?

이 프로세스는 FF와 Chrome에서 거의 모든 다른 브라우저에서 잘 작동합니다.

<div id="donate_form_gift"> 
        <fieldset id="donate_form_gift_amount_fieldset"> 
        <!-- TODO: Update with the correct LEVEL_IDs for your FORM --> 
        <div style="clear: both; margin-top: 5px; color:#000;"> 
         <input type="radio" value="9705" id="level_other" name="level_id" style="display:inline; margin-top:5px;" checked="checked" /> 
         <!-- TODO: update value --> 
         <input type="text" id="other_amount" size="10" name="other_amount" value="" checked="checked" /> 
        </div> 
        </fieldset> 
       </div> <!-- /donate_form_gift --> 

내가 일해야 할 것은 텍스트 입력 필드에 기부의 양을 전달할 수 있습니다 : 여기

입력 필드입니다. 다음은 FF와 다른 브라우저에서 잘 작동하는지 뒤에 스크립트입니다 :이 IE에서 작동하지 않는 이유를 모르겠어요

function change(id) 
{ 
var i=findpos(id); 

totalprice+=(parseInt($('#'+id+'_cnt').val())-purchased[i].cnt)*purchased[i].price; 

purchased[i].cnt=parseInt($('#'+id+'_cnt').val()); 
update_total(); 
} 

function update_total() 
{ 
if(totalprice) 
{ 
    $('#total').html(totalprice); 
    $("input:text:checked").val(totalprice); 
    $("input:text:checked").html(totalprice); 
} 
else 
{ 
    $('#total').html(''); 
} 
} 

...

덕분에,

도움이 필요합니다.

매트

답변

0

나는 IE가 텍스트 입력에 :checked 선택을 존중하지 않는 같은데요. 대신 클래스 선택기를 사용하십시오.

<!-- in the form --> 
<input type="text" ... class="checked" /> 

// and the javascript 
$("input.checked:text").val(totalprice); 
$("input.checked:text").html(totalprice) 
+0

조엘 두 브라우저에서 찾을 작동합니다! – TikaL13

+0

잘 작동했습니다. 고마워요 조엘! – TikaL13

0

시도는

IE는 예외가 다른 브라우저

에 좋아하지 허용 문제는이 var에 테스트 = $ ("입력 [ID^= 'level_other을 이용 해주시기 바랍니다 사용하기 ] ") .val(); 알림 (테스트);

그리고 내가 그 감사를하려고합니다 ... 안녕

관련 문제