Note that there are some explanatory texts on larger screens.

plurals
  1. POhtml vertical auto scroll with javascript
    primarykey
    data
    text
    <p>Im new with pure <code>javascript</code> (well i found its easy to use <code>jquery</code>, but its too bad i cant use <code>jquery</code> in this case :D). </p> <p>I tried to follow this <a href="http://jsfiddle.net/ThinkingStiff/DG8yR/" rel="nofollow noreferrer">sample code</a>, but its not working in my web.</p> <p>This is a screen shoot and <strong>explanation</strong> of my web :</p> <p><img src="https://i.stack.imgur.com/n9cYt.png" alt="enter image description here"></p> <p>So, this page is separated into 2 different html file, one for header and its jquery tabs, the other one for the content below the tab.</p> <p>My plan is to let the content below the jquery tabs scrollable, so the <strong>following code</strong> is from the html of my <strong>content</strong> (<strong>below the jquery tabs</strong>):</p> <pre><code>&lt;body&gt; &lt;script type="javascript"&gt; function top() { document.getElementById( 'top' ).scrollIntoView(); }; function bottom() { document.getElementById( 'bottom' ).scrollIntoView(); window.setTimeout( function () { top(); }, 2000 ); }; bottom(); &lt;/script&gt; &lt;div id="form_search"&gt; &lt;div id="top"&gt;top&lt;/div&gt; &lt;?php echo form_open('backend/index') ?&gt; &lt;p&gt; Kelas : &lt;?php echo form_dropdown('ddl_kelas1', $list_kelas, 'id="ddl_kelas1"');?&gt; - &lt;?php echo form_dropdown('ddl_kelas2', $list_kelas, 'id="ddl_kelas2"');?&gt; &lt;/p&gt; &lt;p&gt; Nama : &lt;?php echo form_input('txt_nama');?&gt; Alamat : &lt;?php echo form_input('txt_alamat');?&gt; Tanggal Lahir : &lt;input type="text" id="datepicker" /&gt; &lt;/p&gt; &lt;?php echo form_submit('btn_search', 'Search');?&gt; &lt;?php echo form_close(); ?&gt; &lt;/div&gt; &lt;div&gt; &lt;?php echo $table ?&gt; &lt;?php echo $pagination ?&gt; &lt;div id="bottom"&gt;bottom&lt;/div&gt; &lt;/div&gt; </code></pre> <p> </p> <p>Please note that the top and bottom div is just for the page limit (i followed the sample code above). I have tried another way like change the id/element used for limit, but its still not working. </p> <p>Thank you for your help :D</p> <p>Note : i use <code>codeigniter</code> framework for this project :D</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload