2014-09-14 3 views
0

나는 2 개의 div가 있습니다.Div datepicker로 겹치기

첫 번째 것은 datepicker div이고 그 아래에 그래프가 있습니다. 날짜를 선택하려고하면이 두 div가 겹쳐서 datepicker가 작동하지 않습니다. 그래프 div보다 datepicker를 억제하고 싶습니다.

//here is image 
http://tinypic.com/r/1549hlz/8 




<div id="cal" name="cal" align="center" style="align: center; float: center; padding- right: 150px;" > 
<form name="form" method="post"> 
<span >From</span> <input type="text" name="date_from" id="date_from" onclick="setSens('date_to', 'max');" readonly="true"> 
<span >Till</span> <input type="text" name="date_to" id="date_to" onclick="setSens('date_from', 'min');" readonly="true"> &nbsp; &nbsp; &nbsp; 
<input name="submit" onclick="show6(); update6();" type="submit" id="submit" value="Akım">&nbsp; &nbsp; &nbsp;<input name="submit" onclick="show6(); update8();"  type="submit" id="submit" value="Güç"> 
</form> 
</div> 


<div id="graph3" name="graph3" align="center" style="display:none;width:1000px;height: 250px;">Akım-Zaman Grafiği</div><br/><br/><br/> 

<script type="text/javascript"> 


function update6(){ 
    graph drawing..... 
} 
</script> 

<script type="text/javascript"> 


function update8(){ 
    another graph drawing..... (not important for the case) 
} 
</script> 


<script> 
function show6(){ 
document.getElementById("graph3").style.display = 'block'; 
document.getElementById("cal").style.display = 'block'; 
} 
</script> 
+0

안녕하세요, HTML 코드를 게시 할 수 있습니까? –

답변

0

플로트를 지우지 않았습니다. 모두 DIV의

<div id="clear" style="clear:both;"></div> 

그래서 ...

<div id="cal" name="cal" align="center" style="align: center; float: center; padding- right: 150px;" > 
<form name="form" method="post"> 
<span >From</span> <input type="text" name="date_from" id="date_from" onclick="setSens('date_to', 'max');" readonly="true"> 
<span >Till</span> <input type="text" name="date_to" id="date_to" onclick="setSens('date_from', 'min');" readonly="true"> &nbsp; &nbsp; &nbsp; 
<input name="submit" onclick="show6(); update6();" type="submit" id="submit" value="Akım">&nbsp; &nbsp; &nbsp;<input name="submit" onclick="show6(); update8();"  type="submit" id="submit" value="Güç"> 
</form> 

    <div id="clear" style="clear:both;"></div> 

</div> 

<div id="graph3" name="graph3" align="center" style="display:none;width:1000px;height: 250px;">Akım-Zaman Grafiği</div> 

<br/><br/><br/> 

추신 사이

넣어이 타입 = "text/javascript"상태는 필요 없습니다. 세 스크립트 모두에 대해 하나의 태그 세트 만 필요합니다.

'<script> 
function update6(){ 
    graph drawing..... 
} 

function update8(){ 
    another graph drawing..... (not important for the case) 
} 

function show6(){ 
document.getElementById("graph3").style.display = 'block'; 
document.getElementById("cal").style.display = 'block'; 
} 

</script>' 
+0

나는 z 인덱스를 시도했지만 아무 것도 바뀌지 않았습니다. – vyonel

+0

위의 코드를 넣어 주셔서 감사합니다. 올바른 부분 인 "date_to"는 괜찮습니다.하지만 왼쪽 부분 "date_from"에서 변경된 부분은 여전히 ​​왼쪽 부분이 그래프 아래에. – vyonel

+0

내가 볼 수 있도록 링크를 줄 수 있습니까? – ablueman