User overflow:auto in style
<div id="background" style="position:fixed;width:100%;height:100%;top:0;left:0;background-color: rgba(0, 0, 0, 0.8);overflow:auto"> .... </div>
سؤال
After clicking a button this code is writen in to a div.
This form is written by using
document.getElementById('justadiv').innerHTML = $belowFormWithoutWhiteSpaceCharacters
Form is much taller then the original height of the window. After the form is created scrollbar of the browser doesnt show up. Is there a way to fix this.
<div id="background" style="position:fixed;width:100%;height:100%;top:0;left:0;background-color: rgba(0, 0, 0, 0.8)">
<div id="window" style="position:relative;width:350px;top:100px;height:auto;margin-left:auto;margin-right:auto;padding:50px;background-color:white;">
<form name="form1" method="post" action="">
<font>Şirket Adı :</font><br><input name="newname" type="text" maxlength="59">
<br><br>
<font>Şirket Türü :</font><br>
<input type="radio" name="newtype" value="1"><font>Limited</font>
<br>
<input type="radio" name="newtype" value="2"><font>Anonim</font>
<br>
<input type="radio" name="newtype" value="3"><font>Komandit</font>
<br>
<input type="radio" name="newtype" value="4"><font>Kolektif</font>
<br><br>
<font>Logo URL :</font><br>
<input name="newurl" type="url">
<br><br><font>Ticaret Ünvanı :</font><br>
<input name="newticunvan" type="text">
<br><br><font>Ticaret Sicil Numarası :</font><br>
<input name="newticno" type="number">
<br><br><font>Şirketin Bağlı Olduğu Ticaret Sicili Müdürlüğü :</font><br>
<input name="newticmudur" type="text">
<br><br><font>Merkezin Adresi :</font><br>
<input name="newmerkezadres" type="text">
<br><br><font>Telefon Numarası :</font><br>
<input name="newtelno" type="tel">
<br><br><font>Tax Numarası :</font><br>
<input name="newfaxno" type="tel">
<br><br><font>Web sitesi :</font><br>
<input name="newwebadres" type="url">
<br><br><font>E-mail adresi :</font><br>
<input name="newemail" type="email">
<input type="button" value="Pencereyi Kapat" onclick="document.getElementById('formcontainer').innerHTML='' ">
<input type="submit" value="Kaydet">
<input type="hidden" name="newcom">
</form>
</div>
</div>
المحلول
User overflow:auto in style
<div id="background" style="position:fixed;width:100%;height:100%;top:0;left:0;background-color: rgba(0, 0, 0, 0.8);overflow:auto"> .... </div>
نصائح أخرى
Use css property overflow:scroll;
<div id="background" style="position:fixed;width:100%;height:100%;top:0;left:0;background-color: rgba(0, 0, 0, 0.8);overflow:scroll"> .... </div>